mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-12 11:02:21 -05: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:
parent
405d54011f
commit
22fd3086ae
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user