raise Exception, "text" --> raise Exception("text")
To have the code work in python3, we need to convert all occurences of raise Exception, "text" to be proper functions. This style also adheres to PEP8. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
@ -47,15 +47,15 @@ class Repository(object):
|
||||
return LocalStatusRepository(name, account)
|
||||
|
||||
else:
|
||||
raise ValueError, "Request type %s not supported" % reqtype
|
||||
raise ValueError("Request type %s not supported" % reqtype)
|
||||
|
||||
config = account.getconfig()
|
||||
repostype = config.get('Repository ' + name, 'type').strip()
|
||||
try:
|
||||
repo = typemap[repostype]
|
||||
except KeyError:
|
||||
raise Exception, "'%s' repository not supported for %s repositories."%\
|
||||
(repostype, reqtype)
|
||||
raise ValueError("'%s' repository not supported for %s repositories"
|
||||
"." % (repostype, reqtype))
|
||||
return repo(name, account)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user