Py3 compatibility fixes.

This commit is contained in:
Pedro Algarvio 2014-11-23 23:53:44 +00:00
parent e760a983d2
commit e33e6ec143

View File

@ -14,6 +14,7 @@ import tempfile
import time
# Import 3rd-party libs
import salt.ext.six as six
from salt.ext.six.moves.urllib.request import urlopen as _urlopen # pylint: disable=no-name-in-module,import-error
# Import salt libs
@ -23,7 +24,6 @@ import salt.utils
import salt.utils.minions
import salt.wheel
import salt.version
import salt.ext.six as six
FINGERPRINT_REGEX = re.compile(r'^([a-f0-9]{2}:){15}([a-f0-9]{2})$')
@ -434,7 +434,7 @@ def safe_accept(target, expr_form='glob'):
ret = ssh_client.cmd(target, 'key.finger', expr_form=expr_form)
failures = {}
for minion, finger in ret.items():
for minion, finger in six.iteritems(ret):
if not FINGERPRINT_REGEX.match(finger):
failures[minion] = finger
else: