Commits

Steve Losh  committed fb7200c

Fix errors when the css files do not exist.

  • Participants
  • Parent commits 61490bd

Comments (0)

Files changed (1)

File flaskext/lesscss.py

         
         for less_path in less_paths:
             css_path = os.path.splitext(less_path)[0] + '.css'
-            css_mtime, less_mtime = os.path.getmtime(css_path), os.path.getmtime(less_path)
+            if not os.path.isfile(css_path):
+                css_mtime = -1
+            else:
+                css_mtime = os.path.getmtime(css_path)
+            less_mtime = os.path.getmtime(less_path)
             if less_mtime >= css_mtime:
                 subprocess.call(['lessc', less_path, css_path], shell=False)