1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-08-13 16:53:54 -04:00

Fix for issues regarding string 'None' being set in config.ini causing issues, this will reset it back to the default setting to avoid further complications.

This commit is contained in:
echel0n 2014-12-10 06:38:57 -08:00
parent 405d54011f
commit 22fd3086ae

View File

@ -372,6 +372,8 @@ def minimax(val, default, low, high):
def check_setting_int(config, cfg_name, item_name, def_val):
try:
my_val = int(config[cfg_name][item_name])
if str(my_val) == str(None):
raise
except:
my_val = def_val
try:
@ -389,6 +391,8 @@ def check_setting_int(config, cfg_name, item_name, def_val):
def check_setting_float(config, cfg_name, item_name, def_val):
try:
my_val = float(config[cfg_name][item_name])
if str(my_val) == str(None):
raise
except:
my_val = def_val
try:
@ -414,6 +418,8 @@ def check_setting_str(config, cfg_name, item_name, def_val, log=True, censor_log
try:
my_val = helpers.decrypt(config[cfg_name][item_name], encryption_version)
if str(my_val) == str(None):
raise
except:
my_val = def_val
try: