Skip to content

Commit b02ff2f

Browse files
Resolve AttributeError in issue_filer.py
Safeguard the process of issue filing by ensuring presence of attributes within Issue variants before accessing them.
1 parent bc21bd7 commit b02ff2f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/clusterfuzz/_internal/issue_management/issue_filer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,9 +493,9 @@ def file_issue(testcase,
493493
if issue_tracker.project == 'google-buganizer':
494494
logs.info('The values of Component IDs:')
495495
logs.info(f'1. Backing: {list(issue.components)}')
496-
removed = list(getattr(issue.components, 'removed', None))
496+
removed = list(getattr(issue.components, 'removed', []))
497497
logs.info(f'2. Removed: {removed}')
498-
added = list(getattr(issue.components, 'added', None))
498+
added = list(getattr(issue.components, 'added', []))
499499
logs.info(f'3. Added: {added}')
500500
logs.info('Primary attempt to the save the issue.')
501501
issue.save()

0 commit comments

Comments
 (0)