Commits

powersurge360  committed 80b75d7

Added a check to see if the scss directory exists, and if not, do nothing.

  • Participants
  • Parent commits e6d2bb2

Comments (0)

Files changed (2)

             for directory in self.directories.values()
         )
 
+    def test_create_directories_junk_scss(self):
+        self.assertFalse(djangosassy.utils.create_directories({}))
+
     def test_build_paths_count(self):
         module_path = os.path.realpath(os.path.dirname(djangosassy.__file__))
 
     '''Creates all the directories necessary, passes on failures (assumes
     directory exists.
     '''
+    try:
+        if not os.path.isdir(directory_dict['scss_dir']):
+            return False
+    except KeyError:
+        return False
+
     for directory in directory_dict.values():
         try:
             os.mkdir(directory)
         except OSError:
             pass
 
+    return True
+
 
 def build_paths(module_path):
     '''Builds a path dictionary for the other functions to use.'''