summaryrefslogtreecommitdiff
path: root/src/connection.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/connection.py')
-rw-r--r--src/connection.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/connection.py b/src/connection.py
index 0ac8be6a..83631da0 100644
--- a/src/connection.py
+++ b/src/connection.py
@@ -118,7 +118,11 @@ class Connection(threading.Thread):
"""
handles the error messages
"""
- room_name = stanza.getFrom().getStripped()
+ from_ = stanza.getFrom()
+ if not from_:
+ room_name = ''
+ else:
+ room_name = from_.getStripped()
self.handler.emit('error-message', room=room_name,
error=stanza.getTag('error'),
msg=stanza.getError())