[elbe-devel] [PATCH 1/5] elbepack: aptpkgutils: fix repr of PackageBase
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Wed Nov 13 13:18:31 CET 2024
Use the correct type name when formating the repr.
There are other subclasses besides APTPackage.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
elbepack/aptpkgutils.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/elbepack/aptpkgutils.py b/elbepack/aptpkgutils.py
index 3409128f983dea4b7559a25f28d4d40f41b848ca..7bd2eea18867fa7eca893e65334f14050f1de190 100644
--- a/elbepack/aptpkgutils.py
+++ b/elbepack/aptpkgutils.py
@@ -232,7 +232,7 @@ class PackageBase:
self.origin = origin
def __repr__(self):
- return (f'<APTPackage {self.name}-{self.installed_version} state: '
+ return (f'<{type(self).__name__} {self.name}-{self.installed_version} state: '
f'{statestring[self.state]}>')
def __eq__(self, other):
--
2.47.0
More information about the elbe-devel
mailing list