From 8a934a6ad606e7822e56bed7921a0a3795638ae0 Mon Sep 17 00:00:00 2001 From: Zhiming Wang Date: Sun, 2 Aug 2015 20:03:42 -0700 Subject: pyblog: do not keep open .nojekyll That will lead to Dropbox constantly syncing the file under preview mode. --- pyblog | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'pyblog') 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) -- cgit v1.2.1