From 5cc9a634fe383bb2db5685d32d90e3933c819483 Mon Sep 17 00:00:00 2001 From: Gregory Szorc Date: Mon, 26 Dec 2016 16:55:47 -0700 Subject: [PATCH] hgweb: don't use mutable default argument value --- mercurial/hgweb/common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mercurial/hgweb/common.py b/mercurial/hgweb/common.py index bdbe791888..4ddd9d2e5f 100644 --- 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):