summaryrefslogtreecommitdiffstats
path: root/nova/exception.py
diff options
context:
space:
mode:
authorEd Leafe <ed@leafe.com>2011-01-25 11:53:48 +0000
committerTarmac <>2011-01-25 11:53:48 +0000
commitbca5b5650921307ec97602607817de6109fb819d (patch)
tree39505955f7f15dcc7a764a34a9fa920c01112cab /nova/exception.py
parent671557507ae65ff5521e32f0d6cf2342e3a5af55 (diff)
parent6de7cb36e9d848f87bde6caa45eeaeb4bf76296a (diff)
downloadnova-bca5b5650921307ec97602607817de6109fb819d.tar.gz
nova-bca5b5650921307ec97602607817de6109fb819d.tar.xz
nova-bca5b5650921307ec97602607817de6109fb819d.zip
Localized strings that employ formatting should not use positional arguments, as they prevent the translator from re-ordering the translated text; instead, they should use mappings (i.e., dicts). This change replaces all localized formatted strings that use more than one formatting placeholder with a mapping version.
Diffstat (limited to 'nova/exception.py')
-rw-r--r--nova/exception.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/nova/exception.py b/nova/exception.py
index ecd814e5d..2320e2214 100644
--- a/nova/exception.py
+++ b/nova/exception.py
@@ -33,8 +33,9 @@ class ProcessExecutionError(IOError):
description = _("Unexpected error while running command.")
if exit_code is None:
exit_code = '-'
- message = _("%s\nCommand: %s\nExit code: %s\nStdout: %r\nStderr: %r")\
- % (description, cmd, exit_code, stdout, stderr)
+ message = _("%(description)s\nCommand: %(cmd)s\n"
+ "Exit code: %(exit_code)s\nStdout: %(stdout)r\n"
+ "Stderr: %(stderr)r") % locals()
IOError.__init__(self, message)