mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Switch open()
for salt.utils.fopen()
This commit is contained in:
parent
4930516e5e
commit
8b4539d9a1
@ -10,6 +10,7 @@ import os
|
||||
import plistlib
|
||||
|
||||
# Import salt libs
|
||||
import salt.utils
|
||||
import salt.utils.decorators as decorators
|
||||
|
||||
# Define the module's virtual name
|
||||
@ -55,7 +56,7 @@ def _available_services():
|
||||
|
||||
try:
|
||||
# This assumes most of the plist files will be already in XML format
|
||||
with open(file_path):
|
||||
with salt.utils.fopen(file_path):
|
||||
plist = plistlib.readPlist(true_path)
|
||||
|
||||
except Exception:
|
||||
|
Loading…
Reference in New Issue
Block a user