Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Py3] Support Py3's plist library #40

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion workflow/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -2935,10 +2935,17 @@ def _delete_directory_contents(self, dirpath, filter_func):
os.unlink(path)
self.logger.debug('Deleted : %r', path)

def _read_info_plist(self):
workflow_plist_path = self.workflowfile('info.plist')
if hasattr(plistlib, 'readPlist'):
return plistlib.readPlist(workflow_plist_path)
with open(workflow_plist_path, 'rb') as workflow_plist_file:
return plistlib.load(workflow_plist_file)

def _load_info_plist(self):
"""Load workflow info from ``info.plist``."""
# info.plist should be in the directory above this one
self._info = plistlib.readPlist(self.workflowfile('info.plist'))
self._info = self._read_info_plist()
self._info_loaded = True

def _create(self, dirpath):
Expand Down