aboutsummaryrefslogtreecommitdiffstats
path: root/pkg_resources
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2018-02-10 23:41:05 -0500
committerJason R. Coombs <jaraco@jaraco.com>2018-02-10 23:41:46 -0500
commitcdf2cc4a521d05ad76aa96cb37504cdb9f824c2a (patch)
treef8e1247c9eb0de1747c505b84f1c04725d38fdee /pkg_resources
parentae9709b31450cdff1c5d00aefcb2ad0d11999f12 (diff)
downloadexternal_python_setuptools-cdf2cc4a521d05ad76aa96cb37504cdb9f824c2a.tar.gz
external_python_setuptools-cdf2cc4a521d05ad76aa96cb37504cdb9f824c2a.tar.bz2
external_python_setuptools-cdf2cc4a521d05ad76aa96cb37504cdb9f824c2a.zip
Use partition
Diffstat (limited to 'pkg_resources')
-rw-r--r--pkg_resources/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py
index c32de489..1d8d88c8 100644
--- a/pkg_resources/__init__.py
+++ b/pkg_resources/__init__.py
@@ -2696,8 +2696,8 @@ class Distribution(object):
for extra in list(filter(None, dm)):
new_extra = extra
reqs = dm.pop(extra)
- if ':' in extra:
- new_extra, marker = extra.split(':', 1)
+ new_extra, _, marker = extra.partition(':')
+ if marker:
if invalid_marker(marker):
# XXX warn
reqs = []