Skip to content

Commit

Permalink
Update pyEpiabm/pyEpiabm/core/person.py
Browse files Browse the repository at this point in the history
Co-authored-by: rccreswell <[email protected]>
  • Loading branch information
mghosh00 and rccreswell authored Mar 7, 2024
1 parent b57b371 commit c288ede
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyEpiabm/pyEpiabm/core/person.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,8 @@ def increment_secondary_infections(self):
infected multiple times, then we only increment the current secondary
infection count)
"""
if self.secondary_infections_counts:
try:
self.secondary_infections_counts[-1] += 1
else:
except IndexError:
raise RuntimeError("Cannot call increment_secondary_infections "
"while secondary_infections_counts is empty")

0 comments on commit c288ede

Please sign in to comment.