Commit dfc63b18 authored by Reinout van Rees's avatar Reinout van Rees

Fix for #212

parent f7018cc4
...@@ -1346,13 +1346,16 @@ class VersionConflict(zc.buildout.UserError): ...@@ -1346,13 +1346,16 @@ class VersionConflict(zc.buildout.UserError):
self.err, self.ws = err, ws self.err, self.ws = err, ws
def __str__(self): def __str__(self):
result = ["There is a version conflict."]
if len(self.err.args) == 2:
existing_dist, req = self.err.args existing_dist, req = self.err.args
result = ["There is a version conflict.", result.append("We already have: %s" % existing_dist)
"We already have: %s" % existing_dist,
]
for dist in self.ws: for dist in self.ws:
if req in dist.requires(): if req in dist.requires():
result.append("but %s requires %r." % (dist, str(req))) result.append("but %s requires %r." % (dist, str(req)))
else:
# The error argument is already a nice error string.
result.append(self.err.args[0])
return '\n'.join(result) return '\n'.join(result)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment