Commits

Armin Ronacher  committed f8b6033

Added a workaround for samefile. This fixes #600

  • Participants
  • Parent commits 3c1d775

Comments (0)

Files changed (1)

File flask/testsuite/__init__.py

         raise RuntimeError('Tried to add nonexisting path')
 
     def _samefile(x, y):
+        if x == y:
+            return True
         try:
             return os.path.samefile(x, y)
-        except (IOError, OSError):
+        except (IOError, OSError, AttributeError):
+            # Windows has no samefile
             return False
     sys.path[:] = [x for x in sys.path if not _samefile(path, x)]
     sys.path.insert(0, path)