From 2011b92f4a75035c261686969a5b9376ad237570 Mon Sep 17 00:00:00 2001 From: Zhiming Wang Date: Thu, 14 May 2015 21:01:14 -0700 Subject: pyblog: fix bug in re match object handling Somehow the linter failed to catch the obvious syntax errors. --- pyblog | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pyblog') diff --git a/pyblog b/pyblog index add06650..383e7b60 100755 --- a/pyblog +++ b/pyblog @@ -788,9 +788,9 @@ def gen_deploy(args): mtime = os.path.getmtime(fullpath) # get date registered in the filename, which has the format # xxxx-xx-xx-blah-blah.md - cdate = datetime.datetime(year=int(matchobj[1]), - month=int(matchobj[2]), - day=int(matchobj[3]), + cdate = datetime.datetime(year=int(matchobj.group(1)), + month=int(matchobj.group(2)), + day=int(matchobj.group(3)), hour=23, minute=59, second=59, tzinfo=dateutil.tz.tzlocal()).timestamp() # skip the post if its source file was created more than three -- cgit v1.2.1