diff options
author | Will Woods <wwoods@redhat.com> | 2007-09-12 17:13:55 -0400 |
---|---|---|
committer | Will Woods <wwoods@redhat.com> | 2007-09-12 17:13:55 -0400 |
commit | 82fbd8a1befdcfb57a94bc57a7089986eaefd695 (patch) | |
tree | ab663e514af88e3b93c41e1059b54997c9e87e52 | |
parent | 121944fbc76df4a6ab5e3f41e01b56f14a75ca0c (diff) | |
download | python-bugzilla-82fbd8a1befdcfb57a94bc57a7089986eaefd695.tar.gz python-bugzilla-82fbd8a1befdcfb57a94bc57a7089986eaefd695.tar.xz python-bugzilla-82fbd8a1befdcfb57a94bc57a7089986eaefd695.zip |
code cleanup
-rw-r--r-- | bugzilla.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/bugzilla.py b/bugzilla.py index 0988419..08d0cc8 100644 --- a/bugzilla.py +++ b/bugzilla.py @@ -443,6 +443,15 @@ class Bug(object): if 'bug_id' in kwargs: setattr(self,'bug_id',kwargs['bug_id']) + def __str__(self): + '''Return a simple string representation of this bug''' + if 'short_short_desc' in self.__dict__: + desc = self.short_short_desc + else: + desc = self.short_desc + return "#%-6s %-10s - %s - %s" % (self.bug_id,self.bug_status, + self.assigned_to,desc) + def __getattr__(self,name): if name not in ('__members__','__methods__','trait_names', '_getAttributeNames') and not name.endswith(')'): @@ -507,14 +516,5 @@ class Bug(object): tags = self.gettags(which) tags.remove(tag) self.setwhiteboard(' '.join(tags),which) - def __str__(self): - '''Return a simple string representation of this bug''' - if 'short_short_desc' in self.__dict__: - desc = self.short_short_desc - else: - desc = self.short_desc - return "#%-6s %-10s - %s - %s" % (self.bug_id,self.bug_status, - self.assigned_to,desc) - # TODO: add a sync() method that writes the changed data in the Bug object # back to Bugzilla. Someday. |