Fix the isolated exception message
Exception's error message should be put right after the Exception with a bracket, othersize it will be ignored. Change-Id: I0be28c20ff21805d9a1a52b702cf497df7b9069e
This commit is contained in:
parent
7376520e26
commit
b4b666cbbd
|
@ -67,15 +67,14 @@ class JobBinaryManager(object):
|
|||
def get_job_binary(self, name):
|
||||
res = self.job_binaries.get(name)
|
||||
if res is None:
|
||||
raise ex.InvalidDataException
|
||||
(_("Invalid job binary"))
|
||||
raise ex.InvalidDataException(_("Invalid job binary"))
|
||||
return res
|
||||
|
||||
def get_job_binary_by_url(self, url):
|
||||
url = urlparse.urlparse(url)
|
||||
if not url.scheme:
|
||||
raise ex.InvalidDataException
|
||||
(_("Job binary url must have a scheme"))
|
||||
raise ex.InvalidDataException(
|
||||
_("Job binary url must have a scheme"))
|
||||
return self.get_job_binary(url.scheme)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue