Skip to content

Commit 87395a7

Browse files
committed
fix SELECTED_LEVEL config when no config.ini exist
1 parent ba1f0b6 commit 87395a7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/config.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ class Config(object):
3737

3838
if os.path.exists(config_file):
3939
cp.read('config.ini', encoding='utf-8')
40-
SELECTED_LEVEL = cp['LEVEL']['selected_level']
40+
SELECTED_LEVEL = cp['LEVEL']['selected_level']
41+
else:
42+
SELECTED_LEVEL = 0
4143

4244

4345
CONFIG = Config()

0 commit comments

Comments
 (0)