Skip to content
Myr

Added a workaround for samefile. This fixes #600

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent 3c1d775 · Browse files · 1 file+4 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−1 removed

  • other:+4 added−1 removed

1 file+4 added−1 removed

modified:flask/testsuite/__init__.py+4 added-1 removed
30 unmodified lines
31 if not os.path.isdir(path):32 raise RuntimeError('Tried to add nonexisting path')3334 def _samefile(x, y):35 if x == y:36 return True37 try:38 return os.path.samefile(x, y)37 except (IOError, OSError):39 except (IOError, OSError, AttributeError):40 # Windows has no samefile41 return False42 sys.path[:] = [x for x in sys.path if not _samefile(path, x)]43 sys.path.insert(0, path)44
180 unmodified lines