Skip to content

Commit

Permalink
show error detail when reading log settings
Browse files Browse the repository at this point in the history
  • Loading branch information
miyouzi committed Feb 15, 2019
1 parent de64e73 commit 6c347bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ColorPrint.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ def read_log_settings():
# 重新载入
with open(Config.get_config_path(), 'r', encoding='utf-8') as f:
settings = json.loads(re.sub(r'\\', '\\\\\\\\', f.read()))
except BaseException:
except BaseException as e:
settings['save_logs'] = True
settings['quantity_of_logs'] = 7
print('日志配置讀取失敗, 將使用默認配置: 啓用日志, 最多保存7份')
print('日志配置讀取失敗, 將使用默認配置: 啓用日志, 最多保存7份 '+str(e))
if 'save_logs' not in settings.keys():
settings['save_logs'] = True
if 'quantity_of_logs' not in settings.keys():
Expand Down

0 comments on commit 6c347bc

Please sign in to comment.