add '--ignore-config' option
This commit is contained in:
@@ -51,12 +51,12 @@ def sanatize_input(file):
|
||||
def main():
|
||||
try:
|
||||
initialize_logging()
|
||||
config.load()
|
||||
|
||||
parser = option.build_parser()
|
||||
args = parser.parse_args()
|
||||
logging.getLogger().setLevel(args.loglevel)
|
||||
|
||||
if args.load_config:
|
||||
config.load()
|
||||
if args.cfgfiles:
|
||||
config.load(*args.cfgfiles, strict=True)
|
||||
if args.yamlfiles:
|
||||
|
||||
@@ -118,6 +118,10 @@ def build_parser():
|
||||
metavar="CFG", dest="yamlfiles", action="append",
|
||||
help="Additional configuration files (YAML format)",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--ignore-config", dest="load_config", action="store_false",
|
||||
help="Do not read the default configuration files",
|
||||
)
|
||||
parser.add_argument(
|
||||
"-o", "--option",
|
||||
metavar="OPT", action=ParseAction, dest="options", default=[],
|
||||
|
||||
Reference in New Issue
Block a user