Closed
Bug 798851
Opened 12 years ago
Closed 12 years ago
Improve sutcli usage formatting
Categories
(Testing :: Mozbase, defect)
Testing
Mozbase
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: mcote, Unassigned)
Details
Attachments
(1 file)
1.66 KB,
patch
|
wlach
:
review+
|
Details | Diff | Splinter Review |
To build on bug 797575, it would be fairly easy to use the textwrap module to nicely wrap the usage text.
Assignee | ||
Comment 1•12 years ago
|
||
In addition to using textwrap, I did a few other little changes in here, namely * moving the initial declaration of 'usage' to after we define the commands, to keep it near where we define the command usage * removed temp variable 'help_args', which is only used in one place * shortened loop variable names to save space * removed the " ".join() between commandname and command['help_args'] and just inserted a space into the main string, since both are always simple strings * used a list comprehension. I don't actually think this is any more readable, nor am I doing it for cool factor, but it is the most concise way to prevent a trailing newline. I think it looks funny to have two blank lines between the usage and error message. Lemme know if you don't agree with any of those changes.
Attachment #668875 -
Flags: review?(wlachance)
Comment 2•12 years ago
|
||
Comment on attachment 668875 [details] [diff] [review] Improve sutcli usage formatting Review of attachment 668875 [details] [diff] [review]: ----------------------------------------------------------------- Looks great! Thanks. Eventually I'd like to switch to a more sophisticated parser for the command line stuff (e.g. http://apenwarr.ca/log/?m=201111), but this is a nice incremental improvement.
Attachment #668875 -
Flags: review?(wlachance) → review+
Assignee | ||
Comment 3•12 years ago
|
||
https://github.com/mozilla/mozbase/commit/c422c2155674ee56f2eae0d17a1545935e20efb6
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•