Replace deprecated import of ABCs from collections
ABCs in collections should be imported from collections.abc and direct import from collections is deprecated since Python 3.3. Change-Id: I6a96d3ed3f046f87822c4cedaa51041885a2d3b6
This commit is contained in:
parent
2a0ec47325
commit
d3fdbcdf60
|
@ -13,7 +13,7 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
import collections
|
||||
from collections import abc
|
||||
|
||||
from django.conf import settings
|
||||
from horizon.utils.memoized import memoized # noqa
|
||||
|
@ -52,7 +52,7 @@ def cloudkittyclient(request):
|
|||
|
||||
|
||||
def identify(what, name=False, key=None):
|
||||
if isinstance(what, collections.Iterable):
|
||||
if isinstance(what, abc.Iterable):
|
||||
for i in what:
|
||||
i['id'] = i.get(key or "%s_id" % i['key'])
|
||||
if name and not i.get('name'):
|
||||
|
|
Loading…
Reference in New Issue