Fix formatting of tuple in error message
authorThomas Thrainer <thomasth@google.com>
Wed, 31 Jul 2013 12:58:29 +0000 (14:58 +0200)
committerThomas Thrainer <thomasth@google.com>
Wed, 31 Jul 2013 13:19:31 +0000 (15:19 +0200)
The missing str() call caused to raise another exception than the wanted
one. Transforming the tuple to string fixes this problem.

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>

lib/uidpool.py

index eb5057d..59401a4 100644 (file)
@@ -111,7 +111,7 @@ def RemoveFromUidPool(uid_pool, remove_uids):
     if uid_range not in uid_pool:
       raise errors.OpPrereqError(
           "User-id range to be removed is not found in the current"
-          " user-id pool: %s" % uid_range, errors.ECODE_INVAL)
+          " user-id pool: %s" % str(uid_range), errors.ECODE_INVAL)
     uid_pool.remove(uid_range)