From f2f49704de2e25a20d96a3701c2442829aaf2971 Mon Sep 17 00:00:00 2001 From: Mikhail Sobolev Date: Sat, 17 Jan 2015 18:11:30 +0200 Subject: [PATCH] make default value for dialects safe --- master/buildbot/status/web/change_hook.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/master/buildbot/status/web/change_hook.py b/master/buildbot/status/web/change_hook.py index 801d39fa50f..ea13e0a8ca6 100644 --- a/master/buildbot/status/web/change_hook.py +++ b/master/buildbot/status/web/change_hook.py @@ -32,13 +32,16 @@ class ChangeHookResource(resource.Resource): contentType = "text/html; charset=utf-8" children = {} - def __init__(self, dialects={}): + def __init__(self, dialects=None): """ The keys of 'dialects' select a modules to load under master/buildbot/status/web/hooks/ The value is passed to the module's getChanges function, providing configuration options to the dialect. """ + if dialects is None: + dialects = {} + self.dialects = dialects self.request_dialect = None