Lint fixes for PR #15980

@lomeroe please take a look, all of these are completely innocent
but watch out for the error on line 60, mixed tabs and spaces :)
This commit is contained in:
Thomas S Hatch 2014-09-22 10:50:25 -06:00
parent 9943e4cda1
commit 119781cba9

View File

@ -28,7 +28,7 @@ def dns_exists(name, servers=None, interface='Local Area Connection', replace=Fa
'''
ret = {'name': name,
'result': True,
'changes': {'Servers Reordered':[],'Servers Added':[],'Servers Removed':[]},
'changes': {'Servers Reordered': [], 'Servers Added': [], 'Servers Removed': []},
'comment': ''}
if __opts__['test']:
@ -51,13 +51,12 @@ def dns_exists(name, servers=None, interface='Local Area Connection', replace=Fa
ret['result'] = True
return ret
# add the DNS servers
for i, server in enumerate(servers):
if __opts__['test']:
if server in configured_list:
if configured_list[i] != server:
ret['changes']['Servers Reordered'].append(server)
ret['changes']['Servers Reordered'].append(server)
else:
ret['changes']['Servers Added'].append(server)
else:
@ -76,9 +75,9 @@ def dns_exists(name, servers=None, interface='Local Area Connection', replace=Fa
ret['changes']['Servers Added'].append(server)
# remove dns servers that weren't in our list
if (replace):
if replace:
for i, server in enumerate(configured_list):
if not server in servers:
if server not in servers:
if __opts__['test']:
ret['changes']['Servers Removed'].append(server)
else: