diff options
author | Yann Leboulanger <asterix@lagaule.org> | 2008-10-11 13:59:52 +0400 |
---|---|---|
committer | Yann Leboulanger <asterix@lagaule.org> | 2008-10-11 13:59:52 +0400 |
commit | 196dd7e30a0b56597bc702b70cf1dcd2be666cb5 (patch) | |
tree | 6a176c0dc19c0f128cab1e15166ec1fcb0c3bab7 /src/gajim-remote.py | |
parent | 00543277e42142d9f74c405eef826fd20bf8edad (diff) |
[thorstenp] use isinstance rather than type(x) == y. use sorted()
Diffstat (limited to 'src/gajim-remote.py')
-rwxr-xr-x | src/gajim-remote.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gajim-remote.py b/src/gajim-remote.py index 241e8d221..f6ee2d968 100755 --- a/src/gajim-remote.py +++ b/src/gajim-remote.py @@ -341,8 +341,7 @@ class GajimRemote: for account_dict in res: print self.print_info(0, account_dict, True) elif self.command == 'prefs_list': - pref_keys = res.keys() - pref_keys.sort() + pref_keys = sorted(res.keys()) for pref_key in pref_keys: result = '%s = %s' % (pref_key, res[pref_key]) if isinstance(result, unicode): @@ -421,8 +420,7 @@ class GajimRemote: def compose_help(self): ''' print usage, and list available commands ''' str = _('Usage: %s command [arguments]\nCommand is one of:\n' ) % BASENAME - commands = self.commands.keys() - commands.sort() + commands = sorted(self.commands.keys()) for command in commands: str += ' ' + command for argument in self.commands[command][1]: |