Fix a deprecation warning of 'collections'

Fix the following warning in tests.

  DeprecationWarning: Using or importing the ABCs from
  'collections' instead of from 'collections.abc' is
  deprecated since Python 3.3, and in 3.9 it will stop working

Change-Id: I0119da31482d667feeae5ecf5059b794da216c7d
Closes-Bug: #1906933
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
This commit is contained in:
Takashi Natsume
2020-12-05 22:34:32 +09:00
parent f851d20b65
commit 0617cebcc9

View File

@@ -186,10 +186,10 @@ class ObjectContent(object):
def __init__(self, obj_ref, prop_list=None, missing_list=None):
self.obj = obj_ref
if not isinstance(prop_list, collections.Iterable):
if not isinstance(prop_list, collections.abc.Iterable):
prop_list = []
if not isinstance(missing_list, collections.Iterable):
if not isinstance(missing_list, collections.abc.Iterable):
missing_list = []
# propSet is the name your Python code will need to