Browse files

Added a workaround for samefile. This fixes #600

  • Loading branch information...
1 parent 3c1d775 commit f8b6033a3b86691470a36db57eba17d996c7d5e8 @mitsuhiko mitsuhiko committed Oct 7, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 flask/testsuite/__init__.py
View
5 flask/testsuite/__init__.py
@@ -32,9 +32,12 @@ def add_to_path(path):
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)

0 comments on commit f8b6033

Please sign in to comment.