From fa08ed629e8b88fd41cc8ee4d723f2a337753c72 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Thu, 24 Aug 2017 13:38:00 -0400 Subject: [PATCH] Set self.allow to a dict if None is passed This used to use a mutable default which would result in self.allow always being a dict. Since allow is a public attribute, even though keystoneauth1/identity/base.py does allow = allow or {} at the usage place, we need to make sure it's a dict here too. Change-Id: I388b8d7859744a1e7bd454641aaf98e4b6caa3b0 --- keystoneauth1/adapter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keystoneauth1/adapter.py b/keystoneauth1/adapter.py index 115ac6dd..9534b239 100644 --- a/keystoneauth1/adapter.py +++ b/keystoneauth1/adapter.py @@ -117,7 +117,7 @@ class Adapter(object): self.auth = auth self.connect_retries = connect_retries self.logger = logger - self.allow = allow + self.allow = allow or {} self.additional_headers = additional_headers or {} self.allow_version_hack = allow_version_hack self.min_version = min_version