need_defcfg = False
readconfig(value)
+ def oc_extra_config(od,os, value, op):
+ readconfig(value)
+
def read_defconfig():
readconfig('/etc/hippotat/config.d', False)
readconfig('/etc/hippotat/passwords.d', False)
readconfig('/etc/hippotat/master.cfg', False)
+ def oc_defconfig(od,os, value, op):
+ nonlocal need_defcfg
+ need_defcfg = False
+ read_defconfig(value)
+
def dfs_less_detailed(dl):
return [df for df in DBG.iterconstants() if df <= dl]
action='callback',
callback= oc_config)
+ optparser.add_option('--extra-config',
+ nargs=1,
+ type='string',
+ metavar='CONFIGFILE',
+ dest='configfile',
+ action='callback',
+ callback= oc_extra_config)
+
+ optparser.add_option('--default-config',
+ action='callback',
+ callback= oc_defconfig)
+
(opts, args) = optparser.parse_args()
if len(args): optparser.error('no non-option arguments please')