diff --git a/airtime_mvc/application/models/Preference.php b/airtime_mvc/application/models/Preference.php index 4db27f0b3..10a6c49d8 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; } 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)})