aboutsummaryrefslogtreecommitdiff
path: root/pyblog
diff options
context:
space:
mode:
authorZhiming Wang <zmwangx@gmail.com>2015-05-14 21:01:14 -0700
committerZhiming Wang <zmwangx@gmail.com>2015-05-14 21:02:02 -0700
commit2011b92f4a75035c261686969a5b9376ad237570 (patch)
tree735ef7207d6881e109b3f15caa1134bc8c992562 /pyblog
parent862e27c9e40be18fb411193631828b101791943c (diff)
downloadmy_new_personal_website-2011b92f4a75035c261686969a5b9376ad237570.tar.xz
my_new_personal_website-2011b92f4a75035c261686969a5b9376ad237570.zip
pyblog: fix bug in re match object handling
Somehow the linter failed to catch the obvious syntax errors.
Diffstat (limited to 'pyblog')
-rwxr-xr-xpyblog6
1 files changed, 3 insertions, 3 deletions
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