From 08242336a0120c849999f039b358d74b485c25b9 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Tue, 30 Oct 2012 16:21:18 -0400 Subject: [PATCH] Changed list_all_watched_dirs and add_watched_dirs to use RequestProvider --- python_apps/api_clients/api_client.py | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/python_apps/api_clients/api_client.py b/python_apps/api_clients/api_client.py index c7f94c150..a1d974348 100644 --- a/python_apps/api_clients/api_client.py +++ b/python_apps/api_clients/api_client.py @@ -548,34 +548,10 @@ class AirtimeApiClient(object): return [] def list_all_watched_dirs(self): - # Does this include the stor directory as well? return self.services.list_all_watched_dirs() - logger = self.logger - try: - url = self.construct_url("list_all_watched_dirs") - - response = self.get_response_from_server(url) - response = json.loads(response) - except Exception, e: - response = None - logger.error("Exception: %s", e) - self.logger.debug(traceback.format_exc()) - - return response def add_watched_dir(self, path): - logger = self.logger - try: - url = self.construct_url("add_watched_dir") - url = url.replace("%%path%%", base64.b64encode(path)) - - response = self.get_response_from_server(url) - response = json.loads(response) - except Exception, e: - response = None - logger.error("Exception: %s", e) - - return response + return self.services.add_watched_dir(path=base64.b64encode(path)) def remove_watched_dir(self, path): logger = self.logger