# HG changeset patch # User Jeff Hammel # Date 1604444444 28800 # Node ID 7cccddcd8b9d2b1094e148b6f1b65357f768f677 # Parent 349ca811c0174c81c199b0e489995181dc2b19c2 py3 diff -r 349ca811c017 -r 7cccddcd8b9d bitsyblog/parser.py --- a/bitsyblog/parser.py Tue Nov 03 14:58:28 2020 -0800 +++ b/bitsyblog/parser.py Tue Nov 03 15:00:44 2020 -0800 @@ -8,7 +8,7 @@ __author__ = "Gustavo Niemeyer " __license__ = "PSF License" -import os.path +import os import string import sys import time @@ -323,8 +323,8 @@ elif isinstance(tzdata, int): tzinfo = tz.tzoffset(res.tzname, tzdata) else: - raise ValueError, "offset must be tzinfo subclass, " \ - "tz string, or int offset" + raise ValueError("offset must be tzinfo subclass, tz string, or int offset") + ret = ret.replace(tzinfo=tzinfo) elif res.tzname and res.tzname in time.tzname: ret = ret.replace(tzinfo=tz.tzlocal())