diff options
author | louiz’ <louiz@louiz.org> | 2016-07-06 10:01:07 +0200 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2016-07-06 10:01:07 +0200 |
commit | 96a9fb699fbdb7c71d7633b6afdec3bb7ea885b9 (patch) | |
tree | 97bc6415ef1f4192d2d965d3f61c749a95bb8f39 | |
parent | 059799bb2d3ed2c42de77cbf6a453dff382b2309 (diff) | |
download | poezio-96a9fb699fbdb7c71d7633b6afdec3bb7ea885b9.tar.gz poezio-96a9fb699fbdb7c71d7633b6afdec3bb7ea885b9.tar.bz2 poezio-96a9fb699fbdb7c71d7633b6afdec3bb7ea885b9.tar.xz poezio-96a9fb699fbdb7c71d7633b6afdec3bb7ea885b9.zip |
Refactor a little thing in /version code
-rw-r--r-- | poezio/core/commands.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/poezio/core/commands.py b/poezio/core/commands.py index 13ac1099..357768a5 100644 --- a/poezio/core/commands.py +++ b/poezio/core/commands.py @@ -304,13 +304,11 @@ class CommandCore: return self.help('version') jid = safeJID(args[0]) - if jid.resource or jid not in roster: + if jid.resource or jid not in roster or not roster[jid].resources: fixes.get_version(self.core.xmpp, jid, callback=callback) elif jid in roster: for resource in roster[jid].resources: fixes.get_version(self.core.xmpp, resource.jid, callback=callback) - else: - fixes.get_version(self.core.xmpp, jid, callback=callback) def _empty_join(self): tab = self.core.current_tab() |