catch exceptions from unknown timezones

This commit is contained in:
Alan Hamlett 2014-11-17 22:33:25 -08:00
parent acaf539001
commit afd488d33b

View file

@ -287,7 +287,10 @@ def send_action(project=None, branch=None, stats=None, key=None, targetFile=None
request.add_header('Authorization', auth) request.add_header('Authorization', auth)
# add Olson timezone to request # add Olson timezone to request
try:
tz = tzlocal.get_localzone() tz = tzlocal.get_localzone()
except:
tz = None
if tz: if tz:
request.add_header('TimeZone', u(tz.zone)) request.add_header('TimeZone', u(tz.zone))