mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #39276 from gtmanfred/2016.11
_device_mismatch_ignored will never be True
This commit is contained in:
commit
304eb19b18
1 changed files with 4 additions and 3 deletions
|
@ -412,18 +412,19 @@ def mounted(name,
|
|||
opts.remove('remount')
|
||||
if real_device not in device_list:
|
||||
# name matches but device doesn't - need to umount
|
||||
_device_mismatch_is_ignored = False
|
||||
_device_mismatch_is_ignored = None
|
||||
for regex in list(device_name_regex):
|
||||
for _device in device_list:
|
||||
if re.match(regex, _device):
|
||||
_device_mismatch_is_ignored = _device
|
||||
break
|
||||
if __opts__['test']:
|
||||
ret['result'] = None
|
||||
ret['comment'] = "An umount would have been forced " \
|
||||
+ "because devices do not match. Watched: " \
|
||||
+ device
|
||||
elif _device_mismatch_is_ignored is True:
|
||||
ret['result'] = None
|
||||
elif _device_mismatch_is_ignored:
|
||||
ret['result'] = True
|
||||
ret['comment'] = "An umount will not be forced " \
|
||||
+ "because device matched device_name_regex: " \
|
||||
+ _device_mismatch_is_ignored
|
||||
|
|
Loading…
Add table
Reference in a new issue