diff --git a/iwla.py b/iwla.py index 0647e24..a3d3bdc 100755 --- a/iwla.py +++ b/iwla.py @@ -34,9 +34,7 @@ from calendar import monthrange from datetime import date, datetime import default_conf as conf -import conf as _ -conf.__dict__.update(_.__dict__) -del _ +import conf as user_conf from iplugin import * from display import * @@ -735,6 +733,23 @@ if __name__ == '__main__': args = parser.parse_args() + # Load user conf + for (k,v) in user_conf.__dict__.items(): + if k.endswith('_append'): + new_k = k[:-7] + if new_k in dir(conf): + if type(conf.__dict__[new_k]) == list: + if type(v) == list: + conf.__dict__[new_k] += v + else: + conf.__dict__[new_k].append(v) + else: + self.logger.error("%s is not a list" % (new_k)) + else: + self.logger.error("%s doesn't exists in default conf" % (new_k)) + else: + conf.__dict__.update({k:v}) + if args.clean_output: if os.path.exists(conf.DB_ROOT): shutil.rmtree(conf.DB_ROOT) if os.path.exists(conf.DISPLAY_ROOT): shutil.rmtree(conf.DISPLAY_ROOT)