From 81074f9c444c30a1a8abf6c508ee244c5275f26d Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Tue, 30 Oct 2012 16:42:00 -0400 Subject: [PATCH] changed notify_source_status to use RequestProvider --- python_apps/api_clients/api_client.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/python_apps/api_clients/api_client.py b/python_apps/api_clients/api_client.py index a1779667d..d4e261f49 100644 --- a/python_apps/api_clients/api_client.py +++ b/python_apps/api_clients/api_client.py @@ -600,13 +600,11 @@ class AirtimeApiClient(object): logger.error("Exception: %s", e) def notify_source_status(self, sourcename, status): - logger = self.logger try: - url = self.construct_url("update_source_status") - url = url.replace("%%sourcename%%", sourcename) - url = url.replace("%%status%%", status) - - self.get_response_from_server(url, attempts = 5) + logger = self.logger + return self.services.update_source_status(sourcename=sourcename, + status=status) + #self.get_response_from_server(url, attempts = 5) except Exception, e: logger.error("Exception: %s", e) @@ -620,7 +618,6 @@ class AirtimeApiClient(object): calculated. This list of files is downloaded into a file and the path to this file is the return value. """ - #http://localhost/api/get-files-without-replay-gain/dir_id/1 return self.services.get_files_without_replay_gain_value()