1. Klaas van Schelven
  2. south

Commits

Andrew Godwin  committed dd202dd

Fix #397 (don't try to remove an NTFS-locked file after test)

  • Participants
  • Parent commits 6240b49
  • Branches default

Comments (0)

Files changed (1)

File south/tests/logger.py

View file
         db.create_table("test10", [('email_confirmed', models.BooleanField(default=False))])
         # Close the logged file
         close_logger()
-        os.remove(self.test_path) 
+        try:
+            os.remove(self.test_path)
+        except:
+            # It's a tempfile, it's not vital we remove it.
+            pass
 
     def test_db_execute_logging_missingfilename(self):
         "Does logging raise an error if there is a missing filename?"