Skip to content

Commit

Permalink
Fix error when guest's primary_address is not set
Browse files Browse the repository at this point in the history
Fixes the following error:
    'ResultGuestData' object has no attribute 'primary_address'
  • Loading branch information
kkaarreell committed Sep 23, 2024
1 parent c52e735 commit 4ba756e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tmt/steps/report/reportportal.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ def go(self, *, logger: Optional[tmt.log.Logger] = None) -> None:
test_name = result.name
test_time = result.start_time or self.time()
# for guests, save their primary address
if result.guest.primary_address:
if getattr(result.guest, 'primary_address', None):
item_attributes.append({
'key': 'guest_primary_address',
'value': result.guest.primary_address})
Expand Down

0 comments on commit 4ba756e

Please sign in to comment.