user-api: Use the right Exception in get_user()

This commit is contained in:
Oskar Hahn 2012-08-04 12:51:07 +02:00
parent 8da09bb985
commit fe1ebf806a

View File

@ -145,8 +145,7 @@ class Users(object):
def generate_uid(prefix, id):
if ':' in prefix:
# TODO: Use the right Exception.
raise Exception("':' is not allowed in a the 'user_prefix'")
raise ValueError("':' is not allowed in a the 'user_prefix'")
return "%s:%d" % (prefix, id)