diff options
| author | Conley Owens <cco3@android.com> | 2013-04-19 15:31:28 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2013-04-19 15:31:29 +0000 |
| commit | c4c01f914c7cdfa997be60ea97cd487d63333a04 (patch) | |
| tree | c7063f88ab55998187c907807364ce7f4444cc4a /subcmds/help.py | |
| parent | 51813dfed1528307c46707bc38b4db33b87bb36e (diff) | |
| parent | 217ea7d2747e3098009afe0b389fc4b45f55ea5a (diff) | |
| download | git-repo-c4c01f914c7cdfa997be60ea97cd487d63333a04.tar.gz | |
Merge "Some fixes for supporting python3"
Diffstat (limited to 'subcmds/help.py')
| -rw-r--r-- | subcmds/help.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/subcmds/help.py b/subcmds/help.py index 78428825..4aa3f863 100644 --- a/subcmds/help.py +++ b/subcmds/help.py | |||
| @@ -34,8 +34,7 @@ Displays detailed usage information about a command. | |||
| 34 | def _PrintAllCommands(self): | 34 | def _PrintAllCommands(self): |
| 35 | print('usage: repo COMMAND [ARGS]') | 35 | print('usage: repo COMMAND [ARGS]') |
| 36 | print('The complete list of recognized repo commands are:') | 36 | print('The complete list of recognized repo commands are:') |
| 37 | commandNames = self.commands.keys() | 37 | commandNames = list(sorted(self.commands)) |
| 38 | commandNames.sort() | ||
| 39 | 38 | ||
| 40 | maxlen = 0 | 39 | maxlen = 0 |
| 41 | for name in commandNames: | 40 | for name in commandNames: |
| @@ -55,10 +54,9 @@ Displays detailed usage information about a command. | |||
| 55 | def _PrintCommonCommands(self): | 54 | def _PrintCommonCommands(self): |
| 56 | print('usage: repo COMMAND [ARGS]') | 55 | print('usage: repo COMMAND [ARGS]') |
| 57 | print('The most commonly used repo commands are:') | 56 | print('The most commonly used repo commands are:') |
| 58 | commandNames = [name | 57 | commandNames = list(sorted([name |
| 59 | for name in self.commands.keys() | 58 | for name, command in self.commands.items() |
| 60 | if self.commands[name].common] | 59 | if command.common])) |
| 61 | commandNames.sort() | ||
| 62 | 60 | ||
| 63 | maxlen = 0 | 61 | maxlen = 0 |
| 64 | for name in commandNames: | 62 | for name in commandNames: |
