misc: use collections.abc.Iterable (#63477)

This commit is contained in:
Frédéric Péters 2022-04-01 18:59:19 +02:00
parent b750a54d7c
commit 63c31fa6d9
1 changed files with 2 additions and 1 deletions

View File

@ -15,6 +15,7 @@
# along with this program; if not, see <http://www.gnu.org/licenses/>.
import collections
import collections.abc
import hashlib
import urllib.parse
import xml.etree.ElementTree as ET
@ -336,7 +337,7 @@ def _get_structured_items(data_source, mode=None, raise_on_error=False):
try:
# noqa pylint: disable=eval-used
value = eval(data_source.get('value'), global_eval_dict, variables)
if not isinstance(value, collections.Iterable):
if not isinstance(value, collections.abc.Iterable):
get_publisher().record_error(
'Python data source (%r) gave a non-iterable result' % data_source.get('value'),
context='[DATASOURCE]',