Merge "Switch to collections.abc.MutableMapping"
This commit is contained in:
commit
5ff7b4ca14
@ -9,7 +9,8 @@
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
import collections
|
||||
|
||||
import collections.abc
|
||||
|
||||
from oslo_policy import policy
|
||||
import pecan
|
||||
@ -163,7 +164,7 @@ def flatten(d, parent_key=''):
|
||||
items = []
|
||||
for k, v in d.items():
|
||||
new_key = parent_key + '.' + k if parent_key else k
|
||||
if isinstance(v, collections.MutableMapping):
|
||||
if isinstance(v, collections.abc.MutableMapping):
|
||||
items.extend(flatten(v, new_key).items())
|
||||
else:
|
||||
items.append((new_key, v))
|
||||
|
Loading…
x
Reference in New Issue
Block a user