Skip to content

Commit

Permalink
Remove calls to deprecated dict.iter methods (#35)
Browse files Browse the repository at this point in the history
Remove calls to deprecated dict.iteritems() and dict.itervalues() methods.
  • Loading branch information
andelink authored Jan 9, 2023
1 parent 803a7f7 commit 3c9b07b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pull_alerts.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def print_all_incidents(
elif group_by_description:
sorted_group_to_incident_list = sorted_description_to_incident_list
if group_by_service or group_by_description:
for group, incident_list in sorted_group_to_incident_list.iteritems():
for group, incident_list in sorted_group_to_incident_list.items():
print("########### {}: {} ##########\n".format(len(incident_list), group))
if not silent:
for incident in incident_list:
Expand Down Expand Up @@ -192,7 +192,7 @@ def sort_incidents(all_incidents, group_by_description, group_by_service):

if group_by_description:
all_incidents = []
for incident_list in sorted_description_to_incident_list.itervalues():
for incident_list in sorted_description_to_incident_list.values():
all_incidents += incident_list
else:
all_incidents = sorted(all_incidents, key=lambda i: i.created_on)
Expand Down

0 comments on commit 3c9b07b

Please sign in to comment.