From 82fbd8a1befdcfb57a94bc57a7089986eaefd695 Mon Sep 17 00:00:00 2001 From: Will Woods Date: Wed, 12 Sep 2007 17:13:55 -0400 Subject: code cleanup --- bugzilla.py | 18 +++++++++--------- 1 file 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. -- cgit