diff options
| author | Doug Greiman <dgreiman@google.com> | 2017-12-22 14:51:36 -0800 |
|---|---|---|
| committer | Doug Greiman <dgreiman@google.com> | 2017-12-22 14:52:14 -0800 |
| commit | 8620a70b45ad4e7222c19ba89b2232821cd4aa70 (patch) | |
| tree | 42b6aec21a0101c484b0789910fb5b9910911eea | |
| parent | 7b8b56fa28fc9ee4cd6e0156074505e3fef620e3 (diff) | |
| download | python-setuptools-git-8620a70b45ad4e7222c19ba89b2232821cd4aa70.tar.gz | |
Slightly simplify code via rstrip()
| -rw-r--r-- | pkg_resources/__init__.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index ffaf7aca..08f9bbe7 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1693,8 +1693,7 @@ class ZipProvider(EggProvider): def _zipinfo_name(self, fspath): # Convert a virtual filename (full path to file) into a zipfile subpath # usable with the zipimport directory cache for our target archive - while fspath.endswith(os.sep): - fspath = fspath[:-1] + fspath = fspath.rstrip(os.sep) if fspath == self.loader.archive: return '' if fspath.startswith(self.zip_pre): |
