Switch open() for salt.utils.fopen()

This commit is contained in:
Pedro Algarvio 2014-11-26 18:50:07 +00:00
parent 4930516e5e
commit 8b4539d9a1

View File

@ -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: