From 11043d2eba61013914dc44a1d090aa72bcbbf4a1 Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Wed, 31 Oct 2012 12:46:51 -0400 Subject: [PATCH] Refactored notify_webstream_data --- python_apps/api_clients/api_client.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/python_apps/api_clients/api_client.py b/python_apps/api_clients/api_client.py index 1623d0c11..797f18597 100644 --- a/python_apps/api_clients/api_client.py +++ b/python_apps/api_clients/api_client.py @@ -424,13 +424,5 @@ class AirtimeApiClient(object): Update the server with the latest metadata we've received from the external webstream """ - try: - url = self.construct_url("notify_webstream_data") - url = url.replace("%%media_id%%", str(media_id)) - data = urllib.urlencode({'data': data}) - self.logger.debug(url) - request = urllib2.Request(url, data) - - self.logger.info(self.get_response_from_server(request, attempts = 5)) - except Exception, e: - self.logger.error("Exception: %s", e) + self.logger.info( self.notify_webstream_data.req( + _post_data={'data':data}, media_id=str(media_id)).retry(5))