From: Ian Jackson Date: Sun, 9 Apr 2017 15:11:12 +0000 (+0100) Subject: Revert "config: Check args after reading config" X-Git-Url: https://git.distorted.org.uk/~mdw/hippotat/commitdiff_plain/f022d67fe5078b10620651b5a0eddbd91d9b018b Revert "config: Check args after reading config" This is total nonsense. We want to parse the arguments first. This reverts commit e5f6fff02ac195add8cf14ad4a597d58c6613a9b. --- diff --git a/hippotatlib/__init__.py b/hippotatlib/__init__.py index 4f0bc8c..e8a502f 100644 --- a/hippotatlib/__init__.py +++ b/hippotatlib/__init__.py @@ -630,13 +630,12 @@ just `+': all DFLAGs. action='callback', callback= oc_config) + (opts, args) = optparser.parse_args() + if len(args): optparser.error('no non-option arguments please') if need_defcfg: read_defconfig() - (opts, args) = optparser.parse_args() - if len(args): optparser.error('no non-option arguments please') - try: (pss, pcs) = _cfg_process_putatives() process_cfg(opts, pss, pcs)