def _write_plist(self, plist):
"""Writes the given plist to the output file.
This method also converts it to binary format if "binary" is True in the
control struct.
Args:
plist: The plist to write to the output path in the control struct.
"""
path_or_file = self._control['output']
plistlib.writePlist(plist, path_or_file)
if self._control.get('binary') and isinstance(path_or_file, basestring):
subprocess.check_call(['plutil', '-convert', 'binary1', path_or_file])
评论列表
文章目录