Skip to content

Commit

Permalink
fix exception typo
Browse files Browse the repository at this point in the history
  • Loading branch information
dixudx committed Nov 22, 2015
1 parent ce2bffe commit a19c1f3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rtcclient/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -845,11 +845,11 @@ def getWorkitem(self, workitem_id, returned_properties=None):

try:
if isinstance(workitem_id, bool):
raise ValueError()
raise ValueError("Invalid Workitem id")
if isinstance(workitem_id, six.string_types):
workitem_id = int(workitem_id)
if not isinstance(workitem_id, int):
raise ValueError()
raise ValueError("Invalid Workitem id")

workitem_url = "/".join([self.url,
"oslc/workitems/%s" % workitem_id])
Expand Down Expand Up @@ -878,7 +878,7 @@ def getWorkitem(self, workitem_id, returned_properties=None):
raise exception.BadValue(excp_msg)
except Exception as excp:
self.log.error(excp)
raise exception.NotFound("Not found <Workitem %s>", workitem_id)
raise exception.NotFound("Not found <Workitem %s>" % workitem_id)

def getWorkitems(self, projectarea_id=None, projectarea_name=None,
returned_properties=None, archived=False):
Expand Down

0 comments on commit a19c1f3

Please sign in to comment.