refactored get_stream_setting
This commit is contained in:
parent
82a8fe99ae
commit
e3914c429d
|
@ -353,15 +353,10 @@ class AirtimeApiClient(object):
|
||||||
|
|
||||||
def get_stream_setting(self):
|
def get_stream_setting(self):
|
||||||
logger = self.logger
|
logger = self.logger
|
||||||
try:
|
try: return self.services.get_stream_setting()
|
||||||
url = self.construct_url("get_stream_setting")
|
|
||||||
response = self.get_response_from_server(url)
|
|
||||||
response = json.loads(response)
|
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
response = None
|
|
||||||
logger.error("Exception: %s", e)
|
logger.error("Exception: %s", e)
|
||||||
|
return None
|
||||||
return response
|
|
||||||
|
|
||||||
def register_component(self, component):
|
def register_component(self, component):
|
||||||
""" Purpose of this method is to contact the server with a "Hey its
|
""" Purpose of this method is to contact the server with a "Hey its
|
||||||
|
|
Loading…
Reference in New Issue