diff --git a/playout/libretime_playout/history/stats.py b/playout/libretime_playout/history/stats.py index d5de3df24..cc5250f5d 100644 --- a/playout/libretime_playout/history/stats.py +++ b/playout/libretime_playout/history/stats.py @@ -153,6 +153,6 @@ class StatsCollectorThread(Thread): while True: try: self._collector.collect(self._config.stream.outputs.merged) - except Exception as exception: + except Exception as exception: # pylint: disable=broad-exception-caught logger.exception(exception) sleep(120) diff --git a/playout/libretime_playout/message_handler.py b/playout/libretime_playout/message_handler.py index 7add17819..c59837dc9 100644 --- a/playout/libretime_playout/message_handler.py +++ b/playout/libretime_playout/message_handler.py @@ -60,7 +60,7 @@ class MessageHandler(ConsumerMixin): else: logger.warning("invalid command: %s", command) - except Exception as exception: + except Exception as exception: # pylint: disable=broad-exception-caught logger.exception(exception) message.ack() diff --git a/playout/libretime_playout/player/fetch.py b/playout/libretime_playout/player/fetch.py index 774eb7fa5..d9b02124d 100644 --- a/playout/libretime_playout/player/fetch.py +++ b/playout/libretime_playout/player/fetch.py @@ -119,7 +119,7 @@ class PypoFetch(Thread): 0, ) logger.info("New timeout: %s", self.listener_timeout) - except Exception as exception: + except Exception as exception: # pylint: disable=broad-exception-caught logger.exception(exception) # Initialize Liquidsoap environment @@ -226,7 +226,7 @@ class PypoFetch(Thread): all_events[key] = item self.media_prepare_queue.put(copy.copy(file_events)) - except Exception as exception: + except Exception as exception: # pylint: disable=broad-exception-caught logger.exception(exception) # Send the data to pypo-push @@ -236,7 +236,7 @@ class PypoFetch(Thread): # cleanup try: self.cache_cleanup(events) - except Exception as exception: + except Exception as exception: # pylint: disable=broad-exception-caught logger.exception(exception) # do basic validation of file parameters. Useful for debugging @@ -295,7 +295,7 @@ class PypoFetch(Thread): logger.info("File '%s' removed", expired_filepath) else: logger.info("File '%s' not removed. Still busy!", expired_filepath) - except Exception as exception: + except Exception as exception: # pylint: disable=broad-exception-caught logger.exception( "Problem removing file '%s': %s", expired_file, exception ) @@ -306,7 +306,7 @@ class PypoFetch(Thread): logger.debug("Received event from API client: %s", self.schedule_data) self.process_schedule(self.schedule_data) return True - except Exception as exception: + except Exception as exception: # pylint: disable=broad-exception-caught logger.exception("Unable to fetch schedule: %s", exception) return False @@ -371,13 +371,13 @@ class PypoFetch(Thread): except Empty: logger.info("Queue timeout. Fetching schedule manually") manual_fetch_needed = True - except Exception as exception: + except Exception as exception: # pylint: disable=broad-exception-caught logger.exception(exception) try: if manual_fetch_needed: self.persistent_manual_schedule_fetch(max_attempts=5) - except Exception as exception: + except Exception as exception: # pylint: disable=broad-exception-caught logger.exception("Failed to manually fetch the schedule: %s", exception) loops += 1 diff --git a/playout/libretime_playout/player/file.py b/playout/libretime_playout/player/file.py index 36e289c84..6e9bc8498 100644 --- a/playout/libretime_playout/player/file.py +++ b/playout/libretime_playout/player/file.py @@ -44,7 +44,7 @@ class PypoFile(Thread): dst_size = os.path.getsize(dst) if dst_size == 0: dst_exists = False - except Exception: + except Exception: # pylint: disable=broad-exception-caught dst_exists = False do_copy = False @@ -86,7 +86,7 @@ class PypoFile(Thread): file_event["filesize"] = file_size file_event["file_ready"] = True - except Exception as exception: + except Exception as exception: # pylint: disable=broad-exception-caught logger.exception( "could not copy file %s to %s: %s", file_id, @@ -123,7 +123,7 @@ class PypoFile(Thread): ) except (requests.exceptions.ConnectionError, requests.exceptions.Timeout): logger.exception(error_msg) - except Exception as exception: + except Exception as exception: # pylint: disable=broad-exception-caught logger.exception("%s: %s", error_msg, exception) return file_size @@ -179,7 +179,7 @@ class PypoFile(Thread): file_event = self.get_highest_priority_file_event(self.file_events) if file_event is not None: self.copy_file(file_event) - except Exception as exception: + except Exception as exception: # pylint: disable=broad-exception-caught logger.exception(exception) raise exception @@ -189,7 +189,7 @@ class PypoFile(Thread): """ try: self.main() - except Exception as exception: + except Exception as exception: # pylint: disable=broad-exception-caught logger.exception(exception) time.sleep(5) diff --git a/playout/libretime_playout/player/push.py b/playout/libretime_playout/player/push.py index f908b5dfd..a98355ac9 100644 --- a/playout/libretime_playout/player/push.py +++ b/playout/libretime_playout/player/push.py @@ -52,7 +52,7 @@ class PypoPush(Thread): while True: try: events = self.queue.get(block=True) - except Exception as exception: + except Exception as exception: # pylint: disable=broad-exception-caught logger.exception(exception) raise exception @@ -103,6 +103,6 @@ class PypoPush(Thread): while True: try: self.main() - except Exception as exception: + except Exception as exception: # pylint: disable=broad-exception-caught logger.exception(exception) time.sleep(5) diff --git a/playout/libretime_playout/player/queue.py b/playout/libretime_playout/player/queue.py index 013bb9a52..956057ecb 100644 --- a/playout/libretime_playout/player/queue.py +++ b/playout/libretime_playout/player/queue.py @@ -74,5 +74,5 @@ class PypoLiqQueue(Thread): def run(self): try: self.main() - except Exception as exception: + except Exception as exception: # pylint: disable=broad-exception-caught logger.exception(exception)