catch exceptions from unknown timezones

This commit is contained in:
Alan Hamlett 2014-11-17 22:33:25 -08:00
parent acaf539001
commit afd488d33b
1 changed files with 4 additions and 1 deletions

View File

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