Mercurial > hg > bitsyblog
changeset 128:7cccddcd8b9d
py3
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Tue, 03 Nov 2020 15:00:44 -0800 |
parents | 349ca811c017 |
children | 85c8877f4c16 |
files | bitsyblog/parser.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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 <gustavo@niemeyer.net>" __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())