Refactor output of commands
Review Request #3847 — Created Feb. 6, 2013 and submitted
Refactor output of commands The commands have been refactored to use consistent output conventions. Any debugging information or non-critical errors should use the logging module (logging.debug(), logging.error(), etc.). Any critical errors that halt execution should raise an exception which will be printed (A stack trace will be printed if debugging is turned on). Any normal output directed at the user should be printed as usual. The clients have yet to be refactored to follow these conventions, which will happen in a future change. Also, The base command class now defines a global option list which is used in addition to the commands option_list. The '[-d | --debug]' option has been refactored to be a global option.
Tested the new error printing mechanism by triggering the code paths in a couple of commands. Ran post with the -d option and verified debug output.
Description | From | Last Updated |
---|---|---|
Col: 17 E128 continuation line under-indented for visual indent |
reviewbot |
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: rbtools/commands/__init__.py rbtools/commands/diff.py rbtools/commands/patch.py rbtools/commands/post.py rbtools/commands/attach.py rbtools/commands/publish.py rbtools/commands/close.py Ignored Files:
-
Most of this looks good. My only real comment is that I think it's frowned upon to raise bare Exception objects. We should probably have a simple error subclass for these.