summaryrefslogtreecommitdiff
path: root/pkg_resources
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2018-02-10 23:51:45 -0500
committerJason R. Coombs <jaraco@jaraco.com>2018-02-10 23:51:45 -0500
commit271dee89e1ec9740c008f1938aa896616e164ede (patch)
treead3a49724d6999c64db3be29bf4c95930fcd262a /pkg_resources
parentcdf2cc4a521d05ad76aa96cb37504cdb9f824c2a (diff)
downloadpython-setuptools-git-271dee89e1ec9740c008f1938aa896616e164ede.tar.gz
Perform marker calculation in one step
Diffstat (limited to 'pkg_resources')
-rw-r--r--pkg_resources/__init__.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py
index 1d8d88c8..062b82c6 100644
--- a/pkg_resources/__init__.py
+++ b/pkg_resources/__init__.py
@@ -2697,12 +2697,12 @@ class Distribution(object):
new_extra = extra
reqs = dm.pop(extra)
new_extra, _, marker = extra.partition(':')
- if marker:
- if invalid_marker(marker):
- # XXX warn
- reqs = []
- elif not evaluate_marker(marker):
- reqs = []
+ fails_marker = marker and (
+ invalid_marker(marker)
+ or not evaluate_marker(marker)
+ )
+ if fails_marker:
+ reqs = []
new_extra = safe_extra(new_extra) or None
dm.setdefault(new_extra, []).extend(reqs)