Use iteritems from six import for python2/3 compatibility.
Fixes bsc#1123497
#
from __future__ import absolute_import
+from salt.ext.six import iteritems
DEFAULT_INTERFACE = 'eth0'
@@ -35,7 +36,7 @@ def get_aliases(hostname):
:return: [string]
"""
hosts = get_hosts()
- for host, aliases in hosts.iteritems():
+ for host, aliases in iteritems(hosts):
if hostname in aliases:
__utils__['caasp_log.debug']('CaaS: retrieved aliases %s for %s', aliases, hostname)
return aliases
