Skip to content

Commit

Permalink
making some changes from djmitche
Browse files Browse the repository at this point in the history
  • Loading branch information
PerilousApricot committed Aug 13, 2010
1 parent a044950 commit fc52151
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions master/buildbot/status/web/baseweb.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def __init__(self, http_port=None, distrib_port=None, allowForce=None,
order_console_by_time=False, changecommentlink=None,
revlink=None, projects=None, repositories=None,
authz=None, logRotateLength=None, maxRotatedFiles=None,
enable_change_hook=False, change_hook_dialects = []):
enable_change_hook=False, change_hook_dialects = {}):
"""Run a web server that provides Buildbot status.
@type http_port: int or L{twisted.application.strports} string
Expand Down Expand Up @@ -318,8 +318,9 @@ def __init__(self, http_port=None, distrib_port=None, allowForce=None,

# do we want to allow change_hook
self.change_hook = enable_change_hook
self.change_hook_dialects = change_hook_dialects
if enable_change_hook:
self.change_hook_dialects = {}
if enable_change_hook and change_hook_dialects:
self.change_hook_dialects = change_hook_dialects
self.putChild("change_hook", ChangeHookResource(dialects = self.change_hook_dialects))

def setupUsualPages(self, numbuilds, num_events, num_events_max):
Expand Down
2 changes: 1 addition & 1 deletion master/buildbot/status/web/change_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ChangeHookResource(resource.Resource):
# this is a cheap sort of template thingy
contentType = "text/html; charset=utf-8"
children = {}
def __init__(self, dialects=[]):
def __init__(self, dialects={}):
self.dialects = dialects

def getChild(self, name, request):
Expand Down

0 comments on commit fc52151

Please sign in to comment.