summaryrefslogtreecommitdiff
path: root/src/tabs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tabs')
-rw-r--r--src/tabs/rostertab.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/tabs/rostertab.py b/src/tabs/rostertab.py
index aaff7de3..bd63d0e3 100644
--- a/src/tabs/rostertab.py
+++ b/src/tabs/rostertab.py
@@ -619,10 +619,13 @@ class RosterInfoTab(Tab):
Add the specified JID to the roster, and set automatically
accept the reverse subscription
"""
- jid = safeJID(safeJID(args[0]).bare)
- if not jid:
+ if args is None:
self.core.information('No JID specified', 'Error')
return
+ jid = safeJID(safeJID(args[0]).bare)
+ if not str(jid):
+ self.core.information('The provided JID (%s) is not valid' % (args[0],), 'Error')
+ return
if jid in roster and roster[jid].subscription in ('to', 'both'):
return self.core.information('Already subscribed.', 'Roster')
roster.add(jid)