diff options
author | Will Woods <wwoods@redhat.com> | 2009-09-18 17:41:32 -0400 |
---|---|---|
committer | Will Woods <wwoods@redhat.com> | 2009-09-18 17:41:32 -0400 |
commit | ec46243295009ed980f946f82fd4cdca47e6e286 (patch) | |
tree | 012d17d4966ba09a0eca8a9b2d63494730e57567 | |
parent | f5d71ec2e061b93a8280a3de9cdaf156d6e92f84 (diff) | |
download | israwhidebroken-ec46243295009ed980f946f82fd4cdca47e6e286.tar.gz israwhidebroken-ec46243295009ed980f946f82fd4cdca47e6e286.tar.xz israwhidebroken-ec46243295009ed980f946f82fd4cdca47e6e286.zip |
Update docstrings a bit
-rw-r--r-- | clientlib.py | 11 |
1 files 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: |