From 9609349a45deafd456c3d0ee805d2aaf6cdbb80d Mon Sep 17 00:00:00 2001 From: Moe Fwacky Date: Fri, 30 Jul 2021 01:01:51 -0700 Subject: [PATCH] Bug fixes fixed time format error fixed exception handling --- both-dir/PseudoChannel.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/both-dir/PseudoChannel.py b/both-dir/PseudoChannel.py index 80d4bdc..ced154f 100644 --- a/both-dir/PseudoChannel.py +++ b/both-dir/PseudoChannel.py @@ -902,7 +902,7 @@ class PseudoChannel(): show_title = entry[3] try: episode_rating = str(next_episode[10]) - except TypeError as e: + except Exception as e: print(e) episode_rating = "None" try: @@ -1443,7 +1443,7 @@ class PseudoChannel(): if entry.end_time.hour >= 0 and entry.end_time.hour < int(config.dailyUpdateTime[0]): entry.end_time = entry.end_time + datetime.timedelta(days=1) if natural_start_time.hour < int(config.dailyUpdateTime[0]) and entry.end_time.hour >= int(config.dailyUpdateTime[0]): - entry.end_time = datetime.datetime.strptime('1900-01-02 0' + str(int(config.dailyUpdateTime[0])-1) + ':59:59.999999', '%y-%m-%d %H:%M:%S.%f') + entry.end_time = datetime.datetime.strptime('1900-01-02 0' + str(int(config.dailyUpdateTime[0])-1) + ':59:59.99999', '%y-%m-%d %H:%M:%S.%f') """Get List of Commercials to inject""" if self.USING_COMMERCIAL_INJECTION: list_of_commercials = self.commercials.get_commercials_to_place_between_media(