summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWill Woods <wwoods@redhat.com>2009-09-18 17:39:09 -0400
committerWill Woods <wwoods@redhat.com>2009-09-18 17:39:09 -0400
commitf5d71ec2e061b93a8280a3de9cdaf156d6e92f84 (patch)
treeed00f9a9defcdf6cea106af910360a90f79003b1
parent202f8001775dc83906dc6f12bc3ab7905a42b872 (diff)
downloadisrawhidebroken-f5d71ec2e061b93a8280a3de9cdaf156d6e92f84.tar.gz
israwhidebroken-f5d71ec2e061b93a8280a3de9cdaf156d6e92f84.tar.xz
israwhidebroken-f5d71ec2e061b93a8280a3de9cdaf156d6e92f84.zip
Fix report_result
-rw-r--r--clientlib.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/clientlib.py b/clientlib.py
index c6f1b04..b9a348a 100644
--- a/clientlib.py
+++ b/clientlib.py
@@ -74,7 +74,11 @@ class IRBClient(BaseClient):
params = {'treeid':treeid, 'testid':testid, 'result': result}
if detail_url:
params['detail_url'] = detail_url
- self.send_request('/add_result', auth=True, req_params=params)
+ r = self.send_request('/add_result', auth=True, req_params=params)
+ if 'id' in r:
+ return r['id']
+ else:
+ pass # FIXME raise an exception or something
def report_result(self, testid, tree_data, result, add_tree=False):
'''Convenience method that will look up the tree using tree_data and
@@ -99,8 +103,4 @@ class IRBClient(BaseClient):
return False
else:
tree = treelist.pop()
- r = self.add_result(treeid=tree['id'], testid=testid, result=result)
- if 'id' in r:
- return r['id']
- else:
- pass # FIXME raise an exception or something
+ return self.add_result(treeid=tree['id'], testid=testid, result=result)