mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
prevent exception when test=True
This commit is contained in:
parent
a81d4b8d8d
commit
1c484f6ad5
@ -368,7 +368,7 @@ class _Ini(_Section):
|
||||
super(_Ini, self).__init__(name, inicontents, separator, commenter)
|
||||
|
||||
def refresh(self, inicontents=None):
|
||||
if inicontents is None:
|
||||
if inicontents is None and __opts__['test'] is False:
|
||||
try:
|
||||
with salt.utils.fopen(self.name) as rfh:
|
||||
inicontents = rfh.read()
|
||||
|
Loading…
Reference in New Issue
Block a user