Skip to content

Commit 9365438

Browse files
committed
config file reading fixed
1 parent f160561 commit 9365438

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

main.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,19 @@
1414
########################
1515
# window scaling #
1616
########################
17-
file = open('scale.config', 'r')
1817
try:
18+
file = open('scale.config', 'r')
1919
configScale = float(file.readline())
2020
if 0.4 <= configScale <= 2:
2121
customtkinter.set_widget_scaling(configScale)
2222
customtkinter.set_window_scaling(configScale)
2323
else:
2424
customtkinter.set_widget_scaling(0.85)
2525
customtkinter.set_window_scaling(0.85)
26+
file.close()
2627
except:
2728
customtkinter.set_widget_scaling(0.85)
2829
customtkinter.set_window_scaling(0.85)
29-
30-
file.close()
3130

3231

3332
#################################################################################################################################################################################

0 commit comments

Comments
 (0)