From 679d1429f3b44c31fe469241540f4a6152400400 Mon Sep 17 00:00:00 2001 From: Sarah Date: Sun, 20 Feb 2022 21:31:02 +0000 Subject: [PATCH] remove debugging catch --- vcinema_utils/VCinemaUtils.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/vcinema_utils/VCinemaUtils.py b/vcinema_utils/VCinemaUtils.py index 5b03626..9de968b 100644 --- a/vcinema_utils/VCinemaUtils.py +++ b/vcinema_utils/VCinemaUtils.py @@ -42,12 +42,8 @@ def filter_viewings(viewings, pivot_field, remove_duplicates=True): for viewing in viewings: viewing_field = viewing[pivot_field] if viewing_field in viewings_filtered.keys(): - try: - if not remove_duplicates or (remove_duplicates and not any(x['imdb_id'] == viewing['imdb_id'] for x in viewings_filtered[viewing_field])): - viewings_filtered[viewing_field] += [viewing] - except KeyError as e: - print(e) - print(viewing) + if not remove_duplicates or (remove_duplicates and not any(x['imdb_id'] == viewing['imdb_id'] for x in viewings_filtered[viewing_field])): + viewings_filtered[viewing_field] += [viewing] else: viewings_filtered[viewing[pivot_field]] = [viewing]