diff options
author | Ed Leafe <ed@leafe.com> | 2011-01-28 00:19:12 +0000 |
---|---|---|
committer | Tarmac <> | 2011-01-28 00:19:12 +0000 |
commit | f8f96f3bf97be6fbfd7af3879a9877865d5eaae9 (patch) | |
tree | 0def984837fc092fe7fe1d83fce8de5e47c0a74a /nova/utils.py | |
parent | d4f77e1c9eaad19f2a917081737840f9e52dac13 (diff) | |
parent | c679e64d13a9ff8643d20316d3a96ed5fc27e0ca (diff) | |
download | nova-f8f96f3bf97be6fbfd7af3879a9877865d5eaae9.tar.gz nova-f8f96f3bf97be6fbfd7af3879a9877865d5eaae9.tar.xz nova-f8f96f3bf97be6fbfd7af3879a9877865d5eaae9.zip |
Added a test that checks for localized strings in the source code that contain position-based string formatting placeholders. If found, an exception message is generated that summarizes the problem, as well as the location of the problematic code. This will prevent future trunk commits from adding localized strings that cannot be properly translated.
Diffstat (limited to 'nova/utils.py')
-rw-r--r-- | nova/utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nova/utils.py b/nova/utils.py index f71a4d880..5f5225289 100644 --- a/nova/utils.py +++ b/nova/utils.py @@ -215,8 +215,8 @@ def get_my_linklocal(interface): raise exception.Error(_("Link Local address is not found.:%s") % if_str) except Exception as ex: - raise exception.Error(_("Couldn't get Link Local IP of %s :%s") - % (interface, ex)) + raise exception.Error(_("Couldn't get Link Local IP of %(interface)s" + " :%(ex)s") % locals()) def to_global_ipv6(prefix, mac): |