Commits

powersurge360 committed a68790b

Added a check for the compilescss management command.

Comments (0)

Files changed (1)

management/commands/compilescss.py

         for app in apps:
             module = __import__(app)
 
+            # Scss works out of the working directory.
             directories = djangosassy.utils.build_paths(
                 os.path.realpath(
                     os.path.dirname(getattr(module, "__file__"))
                 )
             )
 
+            # If there is no scss directory don't bother with this app.
+            try:
+                os.chdir(directories['scss_dir'])
+            except OSError:
+                continue
+
             # Try to create the directories.
             djangosassy.utils.create_directories(directories)
 
-            # Scss works out of the working directory.
-            os.chdir(directories['scss_dir'])
-
             djangosassy.utils.compile_styles(
                 directories['scss_dir'],
                 directories['css_dir']