File: fix-exception.NovaException.patch

package info (click to toggle)
nova 2%3A31.0.0-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 50,892 kB
  • sloc: python: 412,488; pascal: 1,845; sh: 992; makefile: 166; xml: 83
file content (26 lines) | stat: -rw-r--r-- 968 bytes parent folder | download | duplicates (2)
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)