Merge branch '2.3.x' into 2.3.x-saas

This commit is contained in:
Martin Konecny 2013-04-03 17:58:51 -04:00
commit 6c0b0f7732
1 changed files with 5 additions and 4 deletions

View File

@ -13,6 +13,7 @@ import urllib2
import logging import logging
import json import json
import base64 import base64
import traceback
from configobj import ConfigObj from configobj import ConfigObj
AIRTIME_VERSION = "2.3.1" AIRTIME_VERSION = "2.3.1"
@ -86,7 +87,6 @@ class ApiRequest(object):
req = urllib2.Request(final_url, _post_data) req = urllib2.Request(final_url, _post_data)
response = urllib2.urlopen(req).read() response = urllib2.urlopen(req).read()
except Exception, e: except Exception, e:
import traceback
self.logger.error('Exception: %s', e) self.logger.error('Exception: %s', e)
self.logger.error("traceback: %s", traceback.format_exc()) self.logger.error("traceback: %s", traceback.format_exc())
raise raise
@ -364,9 +364,10 @@ class AirtimeApiClient(object):
def notify_liquidsoap_status(self, msg, stream_id, time): def notify_liquidsoap_status(self, msg, stream_id, time):
logger = self.logger logger = self.logger
try: try:
encoded_msg = urllib.quote(msg, '') post_data = {"msg": msg}
self.services.update_liquidsoap_status.req(msg=encoded_msg, stream_id=stream_id, self.services.update_liquidsoap_status.req(post_data,
boot_time=time).retry(5) stream_id=stream_id,
boot_time=time).retry(5)
except Exception, e: except Exception, e:
#TODO #TODO
logger.error("Exception: %s", e) logger.error("Exception: %s", e)