Fix dict iteration bug introduced in pull request #1908.

This commit is contained in:
Eivind Uggedal 2012-08-29 20:48:59 +02:00
parent f510dcbc2f
commit c528f690f4

View File

@ -59,7 +59,7 @@ def get_enabled():
salt '*' service.get_enabled
'''
ret = []
for name, state in enumerate(_get_all_unit_files()):
for name, state in _get_all_unit_files().iteritems():
if state == 'enabled':
ret.append(name)
return sorted(ret)
@ -74,7 +74,7 @@ def get_disabled():
salt '*' service.get_disabled
'''
ret = []
for name, state in enumerate(_get_all_unit_files()):
for name, state in _get_all_unit_files().iteritems():
if state == 'disabled':
ret.append(name)
return sorted(ret)