mirror of
https://github.com/munki/munki.git
synced 2026-05-07 12:59:32 -05:00
More error checking around converting a string into a buffer object.
This commit is contained in:
@@ -86,7 +86,10 @@ def readPlist(filepath):
|
||||
|
||||
def readPlistFromString(data):
|
||||
'''Read a plist data from a string. Return the root object.'''
|
||||
plistData = buffer(data)
|
||||
try:
|
||||
plistData = buffer(data)
|
||||
except TypeError, err:
|
||||
raise NSPropertyListSerializationException(err)
|
||||
dataObject, dummy_plistFormat, error = (
|
||||
NSPropertyListSerialization.
|
||||
propertyListFromData_mutabilityOption_format_errorDescription_(
|
||||
|
||||
Reference in New Issue
Block a user