Skip to content

Conversation

@Wadagraprana
Copy link

Bug Description

The system_version_plist artifact crashes with a TypeError when processing files that don't contain a sysdiagnose archive.

Error Log:

[230/446] system_version_plist [systemVersionPlist] artifact started Reading system_version_plist artifact had errors! Error was argument of type 'NoneType' is not iterable Exception Traceback: File "scripts/artifacts/systemVersionPlist.py", line 41, in system_version_plist elif 'sysdiagnose_' in sysdiagnose_archive and "IN_PROGRESS_" not in sysdiagnose_archive: TypeError: argument of type 'NoneType' is not iterable

Root Cause

In scripts/artifacts/systemVersionPlist.py:

  1. Line 41: When context.get_source_file_path("sysdiagnose_*.tar.gz") doesn't find a matching file, it returns None. The code then attempts to perform a string membership test (in operator) on None, causing a TypeError.

  2. Line 39: The data_source variable is incorrectly assigned to the function object system_version_plist instead of the file path plist_file.

Solution

Changes in scripts/artifacts/systemVersionPlist.py:

Line 41 - Added None check:

# Before
elif 'sysdiagnose_' in sysdiagnose_archive and "IN_PROGRESS_" not in sysdiagnose_archive:

# After
elif sysdiagnose_archive and 'sysdiagnose_' in sysdiagnose_archive and "IN_PROGRESS_" not in sysdiagnose_archive:

This fix ensures that the code checks if sysdiagnose_archive is not None before attempting string operations, preventing the TypeError.

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.

1 participant