From a19c1f35b3e9800582a1ecc5daffda19c2481d4c Mon Sep 17 00:00:00 2001 From: stephenhsu Date: Sun, 22 Nov 2015 21:02:43 +0800 Subject: [PATCH] fix exception typo --- rtcclient/client.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rtcclient/client.py b/rtcclient/client.py index 2b70c4b..edea1d3 100644 --- a/rtcclient/client.py +++ b/rtcclient/client.py @@ -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]) @@ -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_id) + raise exception.NotFound("Not found " % workitem_id) def getWorkitems(self, projectarea_id=None, projectarea_name=None, returned_properties=None, archived=False):