From ec720951540abe9ab504ebe51f221d3cb43f4ef3 Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Wed, 9 Feb 2022 15:59:47 -0500 Subject: [PATCH] test --- SpiceBot/SpiceBotCore/config/__init__.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/SpiceBot/SpiceBotCore/config/__init__.py b/SpiceBot/SpiceBotCore/config/__init__.py index 1e36fea..cb64123 100644 --- a/SpiceBot/SpiceBotCore/config/__init__.py +++ b/SpiceBot/SpiceBotCore/config/__init__.py @@ -12,11 +12,8 @@ class Config(): def __init__(self, script_dir): self.script_dir = script_dir - # opts input - self.opts = self.get_opts() - # Load config - self.config = get_configuration(self.opts) + self.config = get_configuration(self.get_opts()) @property def basename(self): @@ -41,10 +38,7 @@ class Config(): ''' will only get called for undefined attributes ''' """We will try to find a core value, or return None""" - if hasattr(self.config.core, name): - return eval("self.config.core." + name) - - elif hasattr(self.config, name): + if hasattr(self.config, name): return eval("self.config." + name) else: