- This fixes the pkgrepo state and yumpkg module for EL systems. The state was not working with enabled neither with disabled fields.
- Fixes the situation when the "disabled" was saved into the repo file. Internally works with "disabled" but saves "enabled".
get() and check_inheritance() have an optional user parameter.
While said parameter is optional, the functions in questions
do not treat it as such, which at the very least breaks
disable_inheritance() (used by win_dacl.disableinheritance) and
enable_inheritance (used by win_dacl.enableinheritance), as those
functions call check_inheritance() without the user parameter.
Prevents this backtrace:
```
File "/usr/lib64/python2.7/site-packages/salt/state.py", line 1723, in call
**cdata['kwargs'])
File "/usr/lib64/python2.7/site-packages/salt/loader.py", line 1650, in wrapper
return f(*args, **kwargs)
File "/usr/lib64/python2.7/site-packages/salt/states/network.py", line 513, in system
old = __salt__['ip.get_network_settings']()
File "/usr/lib64/python2.7/site-packages/salt/loader.py", line 1053, in __getitem__
func = super(LazyLoader, self).__getitem__(item)
File "/usr/lib64/python2.7/site-packages/salt/utils/lazy.py", line 93, in __getitem__
raise KeyError(key)
KeyError: 'ip.get_network_settings'
```
* Don't add '.' to strerror when passed string ends in ? or !
This keeps the formatted exception string from needlessly containing a
'.' if the sentence ended in a different punctuation mark.
* Better handle cases in which exception was raised w/empty message
Naively comparing sorted dict keys does not guarantee that maps are equal. We
must compare mtimes for filenames in case keys are the same to make sure there
isnt a modified file.
* The Slack execution module doesn't simply return a boolean to indicate
success/failure, but returns `True` in case of success and a dictionary
in case of failure which contains a `res` (boolean) and `message`.
This addresses the varying types returned by the execution module and
properly handles failure cases now instead of simply indicating success
on state execution.
Even before 69afcc4 only `result` was checked, but not its `res`
attribute.
Signed-off-by: Elias Probst <elias@grammofy.com>
* Consistent error msg formatting
Signed-off-by: Elias Probst <elias@grammofy.com>