diff options
author | mathieui <mathieui@mathieui.net> | 2014-04-06 19:52:59 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2014-04-06 19:58:57 +0200 |
commit | e216fd2112c796bd625730f711861b7361f6fe9f (patch) | |
tree | 942239b0bf00dec0f9afd9e036a1bcedf449e6d3 /src/common.py | |
parent | 218c71dfbfb9f564eb1ec2a966df24eef2efbdec (diff) | |
download | poezio-e216fd2112c796bd625730f711861b7361f6fe9f.tar.gz poezio-e216fd2112c796bd625730f711861b7361f6fe9f.tar.bz2 poezio-e216fd2112c796bd625730f711861b7361f6fe9f.tar.xz poezio-e216fd2112c796bd625730f711861b7361f6fe9f.zip |
Code cleanup
fixes whitespace issues, some builtin overrides, and some enormous lines
might make poezio run nanoseconds faster!
Diffstat (limited to 'src/common.py')
-rw-r--r-- | src/common.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common.py b/src/common.py index 1ec2a42a..e9fe05c8 100644 --- a/src/common.py +++ b/src/common.py @@ -205,7 +205,7 @@ def datetime_tuple(timestamp): tz_msg = timestamp[15:] try: ret = datetime.strptime(date, '%Y%m%dT%H%M%S') - except Exception as e: + except Exception: ret = datetime.now() # add the message timezone if any try: @@ -215,7 +215,7 @@ def datetime_tuple(timestamp): tz_msg = tz_msg.tm_hour * 3600 + tz_msg.tm_min * 60 tz_msg = timedelta(seconds=tz_mod * tz_msg) ret -= tz_msg - except Exception as e: + except Exception: pass # ignore if we got a badly-formatted offset # convert UTC to local time, with DST etc. if time.daylight and time.localtime().tm_isdst: |