changeset 738aa5082b6a in /home/hg/repos/gajim

author: Yann Leboulanger <aste...@lagaule.org>
branches: gajim_0.16
details:http://hg.gajim.org/gajim?cmd=changeset;node=738aa5082b6a
description: prevent traceback when a wrong timezone arrive.

diffstat:

 src/common/connection_handlers_events.py |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (16 lines):

diff -r 1bfc811a5e43 -r 738aa5082b6a src/common/connection_handlers_events.py
--- a/src/common/connection_handlers_events.py  Sun Oct 16 10:38:09 2016 +0200
+++ b/src/common/connection_handlers_events.py  Sun Oct 16 22:40:41 2016 +0200
@@ -208,7 +208,11 @@
         tzo = qp.getTag('tzo').getData()
         if tzo.lower() == 'z':
             tzo = '0:0'
-        tzoh, tzom = tzo.split(':')
+        try:
+            tzoh, tzom = tzo.split(':')
+        except Exception, e:
+            # wrong tzo
+            return
         utc_time = qp.getTag('utc').getData()
         ZERO = datetime.timedelta(0)
         class UTC(datetime.tzinfo):
_______________________________________________
Commits mailing list
Commits@gajim.org
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to