mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #38913 from Adaephon-GH/patch-1
Ignore plist files without Label key
This commit is contained in:
commit
953a20350a
1 changed files with 11 additions and 5 deletions
|
@ -103,11 +103,17 @@ def _available_services():
|
|||
plist = plistlib.readPlistFromBytes(
|
||||
salt.utils.to_bytes(plist_xml))
|
||||
|
||||
available_services[plist.Label.lower()] = {
|
||||
'filename': filename,
|
||||
'file_path': true_path,
|
||||
'plist': plist,
|
||||
}
|
||||
try:
|
||||
available_services[plist.Label.lower()] = {
|
||||
'filename': filename,
|
||||
'file_path': true_path,
|
||||
'plist': plist,
|
||||
}
|
||||
except AttributeError:
|
||||
# As of MacOS 10.12 there might be plist files without Label key
|
||||
# in the searched directories. As these files do not represent
|
||||
# services, thay are not added to the list.
|
||||
pass
|
||||
|
||||
return available_services
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue