Fix bug in prettyDiffEntry output
It was not handling adding or removing modules correctly.
This commit is contained in:
parent
aa076ee53b
commit
d0676dbf7c
@ -223,8 +223,14 @@ def prettyDiffEntry(diff):
|
||||
else:
|
||||
return "Unknown"
|
||||
elif change(diff) == "Added":
|
||||
if name(diff) in ["Module", "Package"]:
|
||||
return "%s %s" % (diff["new"][name(diff)]["name"], diff["new"][name(diff)]["version"])
|
||||
else:
|
||||
return " ".join([diff["new"][k] for k in diff["new"]])
|
||||
elif change(diff) == "Removed":
|
||||
if name(diff) in ["Module", "Package"]:
|
||||
return "%s %s" % (diff["old"][name(diff)]["name"], diff["old"][name(diff)]["version"])
|
||||
else:
|
||||
return " ".join([diff["old"][k] for k in diff["old"]])
|
||||
|
||||
return change(diff) + " " + name(diff) + " " + details(diff)
|
||||
|
Loading…
Reference in New Issue
Block a user