From 8aa11f7e8ce6d38ad0d74363ceb9bc1b3d5631ea Mon Sep 17 00:00:00 2001 From: Martin Konecny Date: Wed, 21 Nov 2012 12:26:37 -0500 Subject: [PATCH 1/2] 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)}) From 2a4e4c6405678707841c026c91cfbf6580ab6022 Mon Sep 17 00:00:00 2001 From: denise Date: Wed, 21 Nov 2012 14:17:46 -0500 Subject: [PATCH 2/2] CC-4710: Preferences -> Default Fade in/out: Cannot add songs into schedule if the default fade value is set to int value, for instance, 5 secs. -fixed --- airtime_mvc/application/models/Preference.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/application/models/Preference.php b/airtime_mvc/application/models/Preference.php index 4671de00a..56646b119 100644 --- a/airtime_mvc/application/models/Preference.php +++ b/airtime_mvc/application/models/Preference.php @@ -204,9 +204,9 @@ class Application_Model_Preference $fade = $out; } - $fade = number_format($fade, 2); + $fade = number_format($fade, 1); //fades need 2 leading zeros for DateTime conversion - $fade = str_pad($fade, 5, "0", STR_PAD_LEFT); + $fade = str_pad($fade, 4, "0", STR_PAD_LEFT); return $fade; }