fix(context): move where args are set to context so log/etc isnt overwritten

main
Marshall Hallenbeck 2023-03-14 13:03:09 -04:00
parent 941efd353a
commit 97d9f62803
1 changed files with 3 additions and 3 deletions

View File

@ -8,6 +8,9 @@ import configparser
class Context:
def __init__(self, db, logger, args):
for key, value in vars(args).items():
setattr(self, key, value)
self.db = db
self.log = logger
self.log.debug = logging.debug
@ -16,6 +19,3 @@ class Context:
self.conf = configparser.ConfigParser()
self.conf.read(os.path.expanduser('~/.cme/cme.conf'))
for key, value in vars(args).items():
setattr(self, key, value)