diff --git a/python_apps/api_clients/api_client.py b/python_apps/api_clients/api_client.py index 9f8f48d77..2cf8a8c4c 100644 --- a/python_apps/api_clients/api_client.py +++ b/python_apps/api_clients/api_client.py @@ -452,7 +452,7 @@ class AirTimeApiClient(ApiClientInterface): response = self.get_response_from_server(url) response = json.loads(response) except Exception, e: - response = None + response = {} logger.error("Exception: %s", e) return response diff --git a/python_apps/media-monitor/airtimefilemonitor/airtimenotifier.py b/python_apps/media-monitor/airtimefilemonitor/airtimenotifier.py index be301c958..4487f1b3e 100644 --- a/python_apps/media-monitor/airtimefilemonitor/airtimenotifier.py +++ b/python_apps/media-monitor/airtimefilemonitor/airtimenotifier.py @@ -38,6 +38,11 @@ class AirtimeNotifier(Notifier): time.sleep(5) def init_rabbit_mq(self): + """ + This function will attempt to connect to RabbitMQ Server and if successful + return 'True'. Returns 'False' otherwise. + """ + self.logger.info("Initializing RabbitMQ stuff") try: schedule_exchange = Exchange("airtime-media-monitor", "direct", durable=True, auto_delete=True)