Skip to content

Conversation

@nilamwinarti13
Copy link

Some userDefaults.plist files cannot be parsed by plistlib or biplist and
return a string or None instead of a dictionary. The original code attempted
to iterate with plist.items() unconditionally, which caused:

AttributeError: 'str' object has no attribute 'items'

This patch adds a minimal type guard:

if not isinstance(plist, dict):
    continue

This ensures only valid plist dictionaries are processed, prevents
runtime crashes, and keeps existing functionality unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants