Refactor output of commands

Review Request #3847 — Created Feb. 6, 2013 and submitted — Latest diff uploaded

Information

RBTools
master

Reviewers

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.