X-Git-Url: https://scripts.mit.edu/gitweb/wizard.git/blobdiff_plain/715c070af45346766a9ab78e7cb76faa14da57bf..1157f400fa6912757953582cda2967ec07c82614:/wizard/command/__init__.py diff --git a/wizard/command/__init__.py b/wizard/command/__init__.py index 8d5e14c..e3558f6 100644 --- a/wizard/command/__init__.py +++ b/wizard/command/__init__.py @@ -57,11 +57,14 @@ def make_base_args(options, **grab): """Takes parsed options, and breaks them back into a command line string that we can pass into a subcommand""" args = [] - grab["debug"] = "--debug" - grab["verbose"] = "--verbose" - grab["quiet"] = "--quiet" - #grab["log_db"] = "--log-db" + # Note: you can override these by passing in debug = None + # in your kwargs. + grab.setdefault("debug", "--debug") + grab.setdefault("verbose", "--verbose") + grab.setdefault("quiet", "--quiet") + #grab.setdefault("log_db", "--log-db") for k,flag in grab.items(): + if not flag: continue value = getattr(options, k) if not value: continue args.append(flag)