changeset 50f60d56cbd7 in /home/hg/repos/gajim
author: Yann Leboulanger <[email protected]>
branches:
details:http://hg.gajim.org/gajim?cmd=changeset;node=50f60d56cbd7
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 15e03da41371 -r 50f60d56cbd7 src/common/connection_handlers_events.py
--- a/src/common/connection_handlers_events.py Sun Oct 16 10:37:08 2016 +0200
+++ b/src/common/connection_handlers_events.py Sun Oct 16 22:40:41 2016 +0200
@@ -206,7 +206,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
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits