diff options
| author | Shubham Saini <shubham6405@gmail.com> | 2019-08-05 08:32:33 +0000 |
|---|---|---|
| committer | Shubham Saini <shubham6405@gmail.com> | 2019-08-05 08:32:33 +0000 |
| commit | 227b2d30a8675b44918f9d9ca89b24144a938215 (patch) | |
| tree | 9f8e6a28724514b6fdf463a9ab2067a7ef309b72 /venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_internal/utils/filesystem.py | |
| parent | 842a8cfbbbdb1f92889d892e4859dbd5d40c5be8 (diff) | |
removing venv files
Diffstat (limited to 'venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_internal/utils/filesystem.py')
| -rw-r--r-- | venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_internal/utils/filesystem.py | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_internal/utils/filesystem.py b/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_internal/utils/filesystem.py deleted file mode 100644 index 94fa2c6..0000000 --- a/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_internal/utils/filesystem.py +++ /dev/null | |||
| @@ -1,28 +0,0 @@ | |||
| 1 | import os | ||
| 2 | import os.path | ||
| 3 | |||
| 4 | from pip._internal.compat import get_path_uid | ||
| 5 | |||
| 6 | |||
| 7 | def check_path_owner(path): | ||
| 8 | # If we don't have a way to check the effective uid of this process, then | ||
| 9 | # we'll just assume that we own the directory. | ||
| 10 | if not hasattr(os, "geteuid"): | ||
| 11 | return True | ||
| 12 | |||
| 13 | previous = None | ||
| 14 | while path != previous: | ||
| 15 | if os.path.lexists(path): | ||
| 16 | # Check if path is writable by current user. | ||
| 17 | if os.geteuid() == 0: | ||
| 18 | # Special handling for root user in order to handle properly | ||
| 19 | # cases where users use sudo without -H flag. | ||
| 20 | try: | ||
| 21 | path_uid = get_path_uid(path) | ||
| 22 | except OSError: | ||
| 23 | return False | ||
| 24 | return path_uid == 0 | ||
| 25 | else: | ||
| 26 | return os.access(path, os.W_OK) | ||
| 27 | else: | ||
| 28 | previous, path = path, os.path.dirname(path) | ||
