diff options
author | Zhiming Wang <zmwangx@gmail.com> | 2015-08-02 20:03:42 -0700 |
---|---|---|
committer | Zhiming Wang <zmwangx@gmail.com> | 2015-08-02 20:03:42 -0700 |
commit | 8a934a6ad606e7822e56bed7921a0a3795638ae0 (patch) | |
tree | 11775f17f622f524d018ba784d49b0bea4d44f92 /pyblog | |
parent | 4fadb751e9351993825261afdcfcc3c82ef0d83c (diff) | |
download | my_new_personal_website-8a934a6ad606e7822e56bed7921a0a3795638ae0.tar.xz my_new_personal_website-8a934a6ad606e7822e56bed7921a0a3795638ae0.zip |
pyblog: do not keep open .nojekyll
That will lead to Dropbox constantly syncing the file under preview mode.
Diffstat (limited to '')
-rwxr-xr-x | pyblog | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -697,8 +697,9 @@ def generate_blog(fresh=False, report_total_errors=True): os.remove(obj) # nojekyll: https://help.github.com/articles/files-that-start-with-an-underscore-are-missing/ - with open(os.path.join(BUILDDIR, ".nojekyll"), "w") as fileobj: - pass + if not os.path.exists(os.path.join(BUILDDIR, ".nojekyll")): + with open(os.path.join(BUILDDIR, ".nojekyll"), "w") as fileobj: + pass failed_builds = 0 generator_mtime = os.path.getmtime(GENERATORSOURCE) |