1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
Description: Fix exception.NovaException
Author: Thomas Goirand <zigo@debian.org>
Forwarded: no
Last-Update: 2024-11-19
Index: nova/nova/virt/disk/api.py
===================================================================
--- nova.orig/nova/virt/disk/api.py
+++ nova/nova/virt/disk/api.py
@@ -649,7 +649,7 @@ def _set_passwd(username, admin_passwd,
break
else:
msg = _('User %(username)s not found in password file.')
- raise exception.NovaException(msg % username)
+ raise exception.NovaException(msg % {'username': username})
# update password in the shadow file. It's an error if the
# user doesn't exist.
@@ -665,6 +665,6 @@ def _set_passwd(username, admin_passwd,
if not found:
msg = _('User %(username)s not found in shadow file.')
- raise exception.NovaException(msg % username)
+ raise exception.NovaException(msg % {'username': username})
return "\n".join(new_shadow)
|