mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Merge pull request #11289 from hulu/apache-shadowing
avoid shadowing configfile() func in apache state
This commit is contained in:
commit
bc742630eb
@ -68,8 +68,8 @@ def configfile(name, config):
|
||||
configs = __salt__['apache.config'](name, config, edit=False)
|
||||
current_configs = ''
|
||||
if os.path.exists(name):
|
||||
with open(name) as configfile:
|
||||
current_configs = configfile.read()
|
||||
with open(name) as config_file:
|
||||
current_configs = config_file.read()
|
||||
|
||||
if configs == current_configs.strip():
|
||||
ret['result'] = True
|
||||
@ -81,8 +81,8 @@ def configfile(name, config):
|
||||
return ret
|
||||
|
||||
try:
|
||||
with open(name, 'w') as configfile:
|
||||
print(configs, file=configfile)
|
||||
with open(name, 'w') as config_file:
|
||||
print(configs, file=config_file)
|
||||
ret['changes'] = {
|
||||
'old': current_configs,
|
||||
'new': configs
|
||||
|
Loading…
Reference in New Issue
Block a user