diff --git a/salt/states/x509_v2.py b/salt/states/x509_v2.py index 977731e4c1d2..81f8697fbfa5 100644 --- a/salt/states/x509_v2.py +++ b/salt/states/x509_v2.py @@ -1408,7 +1408,8 @@ def getextname(ext): removed = [] builder_extensions = cx509.Extensions(_getattr_safe(builder, "_extensions")) - for ext in builder_extensions: + # iter is unnecessary, but avoids a pylint < 2.13.6 crash + for ext in iter(builder_extensions): try: cur_ext = current.extensions.get_extension_for_oid(ext.value.oid) if cur_ext.critical != ext.critical or cur_ext.value != ext.value: