Skip to content

Commit

Permalink
Move asDict() next to html_dict() (no functionality change)
Browse files Browse the repository at this point in the history
  • Loading branch information
krajaratnam committed Feb 13, 2010
1 parent b132c59 commit 777bf62
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions buildbot/changes/changes.py
Expand Up @@ -101,6 +101,21 @@ def html_dict(self):

return kwargs

def asDict(self):
result = {}
# Constant
result['number'] = self.number
result['branch'] = self.branch
result['category'] = self.category
result['who'] = self.getShortAuthor()
result['comments'] = self.comments
result['revision'] = self.revision
result['when'] = self.when
result['files'] = self.files
result['revlink'] = self.revlink
result['properties'] = self.properties.asList()
return result

def getShortAuthor(self):
return self.who

Expand Down Expand Up @@ -137,21 +152,6 @@ def getProperties(self):
data += " %s: %s" % (prop[0], prop[1])
return data

def asDict(self):
result = {}
# Constant
result['number'] = self.number
result['branch'] = self.branch
result['category'] = self.category
result['who'] = self.getShortAuthor()
result['comments'] = self.comments
result['revision'] = self.revision
result['when'] = self.when
result['files'] = self.files
result['revlink'] = self.revlink
result['properties'] = self.properties.asList()
return result


class ChangeMaster(service.MultiService):

Expand Down

0 comments on commit 777bf62

Please sign in to comment.