Don't display warnings if not in debug mode

This commit is contained in:
shortcutme 2018-02-10 01:01:15 +01:00
parent 9ca4b823bb
commit c6fd61ddf3
No known key found for this signature in database
GPG Key ID: 5B63BAE6CB9613AE
1 changed files with 2 additions and 0 deletions

View File

@ -48,6 +48,8 @@ if not os.path.isfile("%s/users.json" % config.data_dir):
open("%s/users.json" % config.data_dir, "w").write("{}")
# Setup logging
logging.WARNING = 15 # Don't display warnings if not in debug mode
logging.addLevelName(15, "WARNING")
if config.action == "main":
from util import helper
log_file_path = "%s/debug.log" % config.log_dir