mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-29 18:44:43 +00:00
Python3: fix reading Safari bookmarks
This commit is contained in:
parent
256202a20b
commit
e615480850
1 changed files with 4 additions and 1 deletions
|
|
@ -83,7 +83,10 @@ def get_plist_data_from_string (data):
|
|||
return biplist.readPlistFromString(data)
|
||||
# fall back to normal plistlist
|
||||
try:
|
||||
return plistlib.readPlistFromString(data)
|
||||
if hasattr(plistlib, 'readPlistFromBytes'): # Python 3
|
||||
return plistlib.readPlistFromBytes(data)
|
||||
else:
|
||||
return plistlib.readPlistFromString(data)
|
||||
except Exception:
|
||||
# not parseable (eg. not well-formed, or binary)
|
||||
return {}
|
||||
|
|
|
|||
Loading…
Reference in a new issue