Avoid use xx=[] for parameter to initialize it's value
This patch is deprecated use xx = [] for the parameter initial value, this parameter will only be initialized at the first call,this is not what we expected. Better choice is to set the initial value to None, then initialize xx with xx= xx or [] in method body. More details:http://effbot.org/zone/default-values.htm Change-Id: Iee0648fd500422f48c3f7f35b5066fdc644ae308
This commit is contained in:
parent
111e04d5c3
commit
e681645a54
@ -33,7 +33,7 @@ class AuthTokenMiddleware(auth_token.AuthProtocol):
|
||||
for public routes in the API.
|
||||
|
||||
"""
|
||||
def __init__(self, app, conf, public_api_routes=[]):
|
||||
def __init__(self, app, conf, public_api_routes=()):
|
||||
route_pattern_tpl = '%s(\.json|\.xml)?$'
|
||||
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user