From ec46243295009ed980f946f82fd4cdca47e6e286 Mon Sep 17 00:00:00 2001 From: Will Woods Date: Fri, 18 Sep 2009 17:41:32 -0400 Subject: Update docstrings a bit --- clientlib.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/clientlib.py b/clientlib.py index b9a348a..02ba4c8 100644 --- a/clientlib.py +++ b/clientlib.py @@ -38,7 +38,7 @@ def treedata_from_url(url): class IRBClient(BaseClient): def get_tests(self): - '''Return the list of known tests''' + '''Returns a list of known tests''' r = self.send_request('/get_tests') if 'tests' in r: return r['tests'] @@ -57,7 +57,8 @@ class IRBClient(BaseClient): def add_tree(self, *args, **kw): '''Add a new tree to israwhidebroken. Required arguments: arch, compose_id - Optional: tree_time, repodata_time''' + Optional: tree_time, repodata_time + Returns the new tree.''' for field in ('arch', 'compose_id', 'tree_time', 'repodata_time'): if field not in kw: raise ValueError, "Missing required arg %s" % field @@ -70,7 +71,7 @@ class IRBClient(BaseClient): pass # FIXME raise an exception or something def add_result(self, treeid, testid, result, detail_url=None): - '''Add a test result to the database''' + '''Add a test result to the database. Returns result id on success.''' params = {'treeid':treeid, 'testid':testid, 'result': result} if detail_url: params['detail_url'] = detail_url @@ -90,7 +91,9 @@ class IRBClient(BaseClient): more of (compose_id, tree_time, repodata_time) If add_tree is True and tree_data does not match any known tree, a new - tree will be added.''' + tree will be added. + + Returns result id on success.''' treelist = self.get_trees(**tree_data) if not treelist: if not add_tree: -- cgit