From 8665dba10067d78900faa7682cdee2df32b91829 Mon Sep 17 00:00:00 2001 From: "Adam D. Barratt" Date: Sun, 4 Sep 2011 16:34:58 +0000 Subject: [PATCH] migrationitem: allow instances to be stringified Signed-off-by: Adam D. Barratt --- migrationitem.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/migrationitem.py b/migrationitem.py index 4405cac..67e5efd 100644 --- a/migrationitem.py +++ b/migrationitem.py @@ -23,6 +23,12 @@ class MigrationItem: if name: self._set_name(name) + def __str__(self): + if self._versionned and not self.version is None: + return self.name + else: + return self.uvname + def _get_name(self): return self._name