mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-21 02:01:31 +00:00
zetuptoolz: tolerate a single string for __requires__, and improve error reporting. fixes ticket:2242
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
parent
53ced4be8b
commit
575d7a20a9
@ -529,14 +529,19 @@ class WorkingSet(object):
|
||||
# If we have a __requires__ then we can already tell if this
|
||||
# dist is unsatisfactory, in which case we won't add it.
|
||||
if __requires__ is not None:
|
||||
for thisreqstr in __requires__:
|
||||
if isinstance(__requires__, basestring):
|
||||
array_of__requires__ = [__requires__]
|
||||
else:
|
||||
array_of__requires__ = __requires__
|
||||
|
||||
for thisreqstr in array_of__requires__:
|
||||
try:
|
||||
for thisreq in parse_requirements(thisreqstr):
|
||||
if thisreq.key == dist.key:
|
||||
if dist not in thisreq:
|
||||
return
|
||||
except ValueError, e:
|
||||
e.args = tuple(e.args + ({'thisreqstr': thisreqstr},))
|
||||
e.args = tuple(e.args + ({'thisreqstr': thisreqstr, '__requires__': __requires__},))
|
||||
raise
|
||||
|
||||
self.by_key[dist.key] = dist
|
||||
|
Loading…
x
Reference in New Issue
Block a user