MCPcopy
hub / github.com/corpnewt/gibMacOS / dumps

Function dumps

Scripts/plist.py:229–237  ·  view source on GitHub ↗
(value, fmt=FMT_XML, skipkeys=False, sort_keys=True)

Source from the content-addressed store, hash-verified

227 raise ValueError("Unsupported format: {}".format(fmt))
228
229def dumps(value, fmt=FMT_XML, skipkeys=False, sort_keys=True):
230 # We avoid using writePlistToString() as that uses
231 # cStringIO and fails when Unicode strings are detected
232 f = BytesIO() if _check_py3() else StringIO()
233 dump(value, f, fmt=fmt, skipkeys=skipkeys, sort_keys=sort_keys)
234 value = f.getvalue()
235 if _check_py3():
236 value = value.decode("utf-8")
237 return value
238
239### ###
240# Binary Plist Stuff For Py2 #

Callers

nothing calls this directly

Calls 2

_check_py3Function · 0.85
dumpFunction · 0.85

Tested by

no test coverage detected