From 4d1302696e997e0eae677e85ddf9f4f21af80c21 Mon Sep 17 00:00:00 2001 From: skullY Date: Fri, 15 Nov 2019 22:21:26 -0800 Subject: [PATCH] Make folding arguments into config operate more correctly. --- milc.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/milc.py b/milc.py index e19b123..6b5347b 100644 --- a/milc.py +++ b/milc.py @@ -501,12 +501,12 @@ class MILC(object): if argument not in self.arg_only: # Find the argument's section - argument_found = True - for group in self.default_arguments: - if argument in self.default_arguments[group]: - argument_found = True - section = group - break + if argument in self.default_arguments[self._entrypoint.__name__]: + argument_found = True + section = self._entrypoint.__name__ + if argument in self.default_arguments['general']: + argument_found = True + section = 'general' if not argument_found: raise RuntimeError('Could not find argument in `self.default_arguments`. This should be impossible!')