Skip to content

Commit

Permalink
Skip the ownership check if we don't have os.geteuid()
Browse files Browse the repository at this point in the history
  • Loading branch information
dstufft committed Jan 3, 2015
1 parent 0e96c4b commit eccc0e6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pip/utils/filesystem.py
@@ -1,9 +1,15 @@
import os
import os.path

from pip.compat import get_path_uid


def check_path_owner(path, uid):
# If we don't have a way to check the effective uid of this process, then
# we'll just assume that we own the directory.
if not hasattr(os, "geteuid"):
return True

previous = None
while path != previous:
if os.path.lexists(path):
Expand Down

0 comments on commit eccc0e6

Please sign in to comment.