At some point in the future it could be a good idea to drop the _aliases mapping altogether; it will be hard to do so, in case the users are not informed that they are using a deprecated ID. Signed-off-by: Pino Toscano <ptoscano@xxxxxxxxxx> --- virtinst/osdict.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/virtinst/osdict.py b/virtinst/osdict.py index 39422233..b78bcedd 100644 --- a/virtinst/osdict.py +++ b/virtinst/osdict.py @@ -192,7 +192,14 @@ class _OSDB(object): return osobj def lookup_os(self, key): - key = self._aliases.get(key) or key + try: + mapped_key = self._aliases[key] + logging.warning(_("Using a deprecated Guest osinfo %s, " + "%s will be used instead"), + key, mapped_key) + key = mapped_key + except KeyError: + pass return self._all_variants.get(key) def lookup_os_by_media(self, location): -- 2.17.1 _______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list