diff options
author | Will Woods <wwoods@redhat.com> | 2008-01-03 14:13:32 -0500 |
---|---|---|
committer | Will Woods <wwoods@redhat.com> | 2008-01-03 14:13:32 -0500 |
commit | a93d570b2cdbc5a07bde93e662601fd16ba06d01 (patch) | |
tree | 7a32f988cbf824467913c35bc616422583064e22 | |
parent | 9a8879dae9bd9b9fcb43a1f3653d6a18826ea0be (diff) | |
download | python-bugzilla-a93d570b2cdbc5a07bde93e662601fd16ba06d01.tar.gz python-bugzilla-a93d570b2cdbc5a07bde93e662601fd16ba06d01.tar.xz python-bugzilla-a93d570b2cdbc5a07bde93e662601fd16ba06d01.zip |
Clarify AttributeError for missing attributes; add reload() alias for Bug.refresh()
-rw-r--r-- | bugzilla.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bugzilla.py b/bugzilla.py index ec6e6b8..434a421 100644 --- a/bugzilla.py +++ b/bugzilla.py @@ -731,7 +731,7 @@ class Bug(object): if 'bug_id' in self.__dict__: if self.bugzilla.bugfields and name not in self.bugzilla.bugfields: # We have a list of fields, and you ain't on it. Bail out. - raise AttributeError + raise AttributeError, "field %s not in bugzilla.bugfields" % name #print "Bug %i missing %s - loading" % (self.bug_id,name) self.refresh() if name in self.__dict__: @@ -743,6 +743,10 @@ class Bug(object): r = self.bugzilla._getbug(self.bug_id) self.__dict__.update(r) + def reload(self): + '''An alias for reload()''' + self.refresh() + def setstatus(self,status,comment='',private=False,private_in_it=False,nomail=False): '''Update the status for this bug report. Valid values for status are listed in querydefaults['bug_status_list'] |