user-api: Use the right Exception in get_user()
This commit is contained in:
parent
8da09bb985
commit
fe1ebf806a
@ -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)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user