From 0e38cc634bf856237d3e208ae7f3405c3213efe5 Mon Sep 17 00:00:00 2001 From: Roger Miret Date: Tue, 30 Jun 2020 17:35:17 +0200 Subject: [PATCH] Fix bug in notification import When removing a string from a list of strings, `del list["string"]` will cause a "TypeError: list indices must be integers or slices, not str". File "/usr/local/lib/python3.7/site-packages/tower_cli/cli/transfer/send.py", line 1503, in import_notification_relations del existing_notifications[notification_name] TypeError: list indices must be integers or slices, not str --- tower_cli/cli/transfer/send.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tower_cli/cli/transfer/send.py b/tower_cli/cli/transfer/send.py index 3696f2f8..97ae9d11 100644 --- a/tower_cli/cli/transfer/send.py +++ b/tower_cli/cli/transfer/send.py @@ -1500,7 +1500,7 @@ def import_notification_relations(self, asset, new_notifications, notification_t # If the notification is already in the existing_notifications we don't need to do anything # Just remove it from the existing notifications so we dont delete it if notification_name in existing_notifications: - del existing_notifications[notification_name] + existing_notifications.remove(notification_name) continue try: