From 8aa11f7e8ce6d38ad0d74363ceb9bc1b3d5631ea Mon Sep 17 00:00:00 2001 From: Martin Konecny Date: Wed, 21 Nov 2012 12:26:37 -0500 Subject: [PATCH] Better error message for api client constructor --- python_apps/api_clients/api_client.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python_apps/api_clients/api_client.py b/python_apps/api_clients/api_client.py index f9c85c0a9..9d6b16597 100644 --- a/python_apps/api_clients/api_client.py +++ b/python_apps/api_clients/api_client.py @@ -136,7 +136,8 @@ class AirtimeApiClient(object): self.config = ConfigObj(config_path) self.services = RequestProvider(self.config) except Exception, e: - self.logger.error('Error loading config file: %s', e) + self.logger.error('Error loading config file: %s', config_path) + self.logger.error('Exception: %s', str(e)) sys.exit(1) def __get_airtime_version(self): @@ -377,7 +378,7 @@ class AirtimeApiClient(object): response = self.services.get_stream_parameters() self.logger.debug(response) return response - + def push_stream_stats(self, data): # TODO : users of this method should do their own error handling response = self.services.push_stream_stats(_post_data={'data': json.dumps(data)})