Skip to content

Conversation

@Tokenzrey
Copy link

This PR fixes a critical bug in systemVersionPlist.py that causes the artifact parser to crash with a TypeError.

The crash was caused by passing the function object system_version_plist to the plist parser instead of the file path string plist_file. This occurred due to a variable naming error where the function name was used in an assignment statement instead of the local variable holding the path.

Changes

  • Corrected: Changed assignment on line 39 to use plist_file instead of system_version_plist.
  • Result: The get_plist_file_content function now receives a valid string path, allowing the artifact to parse successfully and extract iOS version information.

Verification & Testing

I have created a reproduction script (test_sysversion_fix.py) to verify the fix.

  • Test Suite: 6/6 tests passed.
  • Scenarios Covered:
    • Plist File Path Type Validation.
    • Function Object vs String Comparison.
    • get_plist_file_content Argument Type validation.
    • data_source Assignment Validation.
    • Comparison of Original (Buggy) vs. Fixed patterns.
    • Complete Workflow Integration.

Test Output Summary:

TEST SUMMARY
================================================================================
Plist File Path Type Validation................... [PASS]
Function Object vs String Comparison.............. [PASS]
get_plist_file_content Argument Type.............. [PASS]
data_source Assignment Validation................. [PASS]
Original Bug vs Fixed Code........................ [PASS]
Complete Workflow Integration..................... [PASS]
================================================================================
Total: 6/6 tests passed
[SUCCESS] ALL TESTS PASSED - Fix is working correctly!

Checklist

  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
  • I have verified the fix with a local test script.
  • The changes generate no new warnings.

Related Issues

Closes #1390

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.

[Bug] systemVersionPlist.py crashes with TypeError due to incorrect variable assignment

1 participant