test(playout): silence existing broad-exception-caught errors
This commit is contained in:
parent
a77321190f
commit
b17ff4afad
|
@ -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)
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue