Commits

Andrew Godwin committed 61cf8ce

Fix file handles.

Comments (0)

Files changed (1)

south/tests/logger.py

         settings.SOUTH_LOGGING_FILE = self.test_path
         # Check to see if we can make the logfile
         try:
-            open(self.test_path, "w")
+            fh = open(self.test_path, "w")
         except IOError:
             # Permission was denied, ignore the test.
             return
+        else:
+            fh.close()
         # Do an action which logs
         db.create_table("test10", [('email_confirmed', models.BooleanField(default=False))])
         # Close the logged file