Commits

Oliver Tonnhofer  committed fb740cb

check page.html for modifications in --live mode

  • Participants
  • Parent commits 18cefa3

Comments (0)

Files changed (1)

 
     # check if anything changed
     if opts.live:
+        last_build_time = 0
+        last_mod_time = os.path.getmtime(page_html)
+
         out_files = glob.glob(opj(dir_out, "*"))
         if out_files:
             last_build_time = os.path.getmtime(out_files[0])
-            last_mod_time = 0
             for cwd, dirs, files in os.walk(dir_in.decode(opts.filename_enc)):
                 for f in files:
                     last_mod_time = max(os.path.getmtime(opj(cwd, f)), last_mod_time)
 
-            if last_mod_time < last_build_time:
-                return
+        if last_mod_time < last_build_time:
+            return
 
     # prepare output directory
     for fod in glob.glob(opj(dir_out, "*")):