"""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)