Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/python-nbxmpp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlovetox <philipp@hoerist.com>2020-08-14 13:47:43 +0300
committerlovetox <philipp@hoerist.com>2020-08-15 09:42:45 +0300
commitc0b512fe91cbdceae2f31408b19e7a4173bc572e (patch)
tree85e1eafc96955e2538557e373611a9bb217dcd29
parent29d4261e7baed998c564d5e104b61b348d7f9640 (diff)
TCP: Catch Runtime error
Fixes #101
-rw-r--r--nbxmpp/tcp.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/nbxmpp/tcp.py b/nbxmpp/tcp.py
index ff91c6b..7c6b6b7 100644
--- a/nbxmpp/tcp.py
+++ b/nbxmpp/tcp.py
@@ -286,6 +286,13 @@ class TCPConnection(Connection):
self._log.error('Write Error: %s', error)
return
+ except RuntimeError as error:
+ # PyGObject raises a RuntimeError when it failed to for some reason
+ # to convert the GError. Why it failed to convert is printed by
+ # PyGObject
+ self._log.error(error)
+ return
+
data = data.decode()
self._log_stanza(data, received=False)