diff options
author | Zhiming Wang <zmwangx@gmail.com> | 2015-05-14 21:01:14 -0700 |
---|---|---|
committer | Zhiming Wang <zmwangx@gmail.com> | 2015-05-14 21:02:02 -0700 |
commit | 2011b92f4a75035c261686969a5b9376ad237570 (patch) | |
tree | 735ef7207d6881e109b3f15caa1134bc8c992562 | |
parent | 862e27c9e40be18fb411193631828b101791943c (diff) | |
download | my_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.
-rwxr-xr-x | pyblog | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 |