# HG changeset patch
# User Gregory Szorc <gregory.sz...@gmail.com>
# Date 1482796547 25200
#      Mon Dec 26 16:55:47 2016 -0700
# Node ID 735405d42d45801c7b75448e0263088327cac4af
# Parent  f3927785d168824ac04c4eb44361337775286e01
hgweb: don't use mutable default argument value

diff --git a/mercurial/hgweb/common.py b/mercurial/hgweb/common.py
--- a/mercurial/hgweb/common.py
+++ b/mercurial/hgweb/common.py
@@ -91,12 +91,12 @@ permhooks = [checkauthz]
 
 
 class ErrorResponse(Exception):
-    def __init__(self, code, message=None, headers=[]):
+    def __init__(self, code, message=None, headers=None):
         if message is None:
             message = _statusmessage(code)
         Exception.__init__(self, message)
         self.code = code
-        self.headers = headers
+        self.headers = headers or []
 
 class continuereader(object):
     def __init__(self, f, write):
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to