diff options
author | Will Woods <wwoods@redhat.com> | 2008-01-04 17:39:50 -0500 |
---|---|---|
committer | Will Woods <wwoods@redhat.com> | 2008-01-04 17:39:50 -0500 |
commit | 968168a1901bbad55a2fce8cda04b89f0b90ccbd (patch) | |
tree | 5647fd56623df606bd092f8f38a94365347c9607 | |
parent | 10f23b519983f4f5686dc08edda83e72a76ae2a2 (diff) | |
download | python-bugzilla-968168a1901bbad55a2fce8cda04b89f0b90ccbd.tar.gz python-bugzilla-968168a1901bbad55a2fce8cda04b89f0b90ccbd.tar.xz python-bugzilla-968168a1901bbad55a2fce8cda04b89f0b90ccbd.zip |
stupid naive tweak in replace_errors_with_None for _getbugssimple.. also clarify getbugs() docstring
-rw-r--r-- | bugzilla.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/bugzilla.py b/bugzilla.py index 9a96b33..1d051b3 100644 --- a/bugzilla.py +++ b/bugzilla.py @@ -22,7 +22,9 @@ def replace_errors_with_None(r): Otherwise, r is returned. This is mostly used for XMLRPC Multicall handling.''' # Yes, this is a naive implementation - if isinstance(r,dict): + # FIXME that bug_id thing is only good for getbug, but I want + # to leave the git tree in a usable state... + if isinstance(r,dict) and 'bug_id' in r: return r else: return None @@ -329,11 +331,14 @@ class Bugzilla(object): return Bug(bugzilla=self,dict=self._getbugsimple(id)) def getbugs(self,idlist): '''Return a list of Bug objects with the full complement of bug data - already loaded.''' + already loaded. If there's a problem getting the data for a given id, + the corresponding item in the returned list will be None.''' return [(b and Bug(bugzilla=self,dict=b)) or None for b in self._getbugs(idlist)] def getbugssimple(self,idlist): '''Return a list of Bug objects for the given bug ids, populated with - simple info''' + simple info. As with getbugs(), if there's a problem getting the data + for a given bug ID, the corresponding item in the returned list will + be None.''' return [(b and Bug(bugzilla=self,dict=b)) or None for b in self._getbugssimple(idlist)] def query(self,query): '''Query bugzilla and return a list of matching bugs. |