Skip to content

Commit cfc20aa

Browse files
committed
fix: index error when diff same versions
1 parent bff18d5 commit cfc20aa

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

nala/summary.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,9 @@ def get_rows(pkg: NalaPackage, layout: Iterable[str]) -> Generator[Text, None, N
176176

177177
def version_diff(pkg: NalaPackage) -> str:
178178
"""Return a colored diff of the new version."""
179-
# If there is no old version, then we don't need to color anything
180-
if not pkg.old_version:
179+
# If there is no old version, or the versions are the same
180+
# then don't color anything
181+
if not pkg.old_version or pkg.old_version == pkg.version:
181182
return pkg.version
182183

183184
# Check for just revision change first.

0 commit comments

Comments
 (0)