aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhiming Wang <zmwangx@gmail.com>2015-08-02 20:03:42 -0700
committerZhiming Wang <zmwangx@gmail.com>2015-08-02 20:03:42 -0700
commit8a934a6ad606e7822e56bed7921a0a3795638ae0 (patch)
tree11775f17f622f524d018ba784d49b0bea4d44f92
parent4fadb751e9351993825261afdcfcc3c82ef0d83c (diff)
downloadmy_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.
-rwxr-xr-xpyblog5
1 files changed, 3 insertions, 2 deletions
diff --git a/pyblog b/pyblog
index 8f8e19d0..0d3e81e2 100755
--- a/pyblog
+++ b/pyblog
@@ -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)