Drop collections.Iterable in favor of collections.abc.Iterable

Python3 has deprecated (and recently dropped) collections.Iterable in
favor of using the collections.abc module. This change fixes the import.

Closes-Bug: #1966442
Change-Id: I76ed972890a2fe0bedebd0364276590d5aa90f29
This commit is contained in:
Felipe Reyes 2022-03-25 10:04:05 -03:00
parent 0d760009cc
commit c672101e60
1 changed files with 3 additions and 2 deletions

View File

@ -13,12 +13,13 @@
# License for the specific language governing permissions and limitations
# under the License.
import collections
import ctypes
import os
import re
import threading
from collections.abc import Iterable
from oslo_log import log as logging
from os_win._i18n import _
@ -200,7 +201,7 @@ class DiskUtils(baseutils.BaseUtils):
ret = self._conn_storage.Msft_StorageSetting.UpdateHostStorageCache()
if isinstance(ret, collections.Iterable):
if isinstance(ret, Iterable):
ret = ret[0]
if ret: