CC-4910: Need to properly handle non-200 http status codes in api client

-fixed
This commit is contained in:
Martin Konecny 2013-02-04 16:05:58 -05:00
parent 20a3f674b4
commit 331386f74f
12 changed files with 156 additions and 156 deletions

View file

@ -26,13 +26,10 @@ def generate_liquidsoap_config(ss):
logging.basicConfig(format='%(message)s')
ac = AirtimeApiClient(logging.getLogger())
ss = ac.get_stream_setting()
if ss is not None:
try:
generate_liquidsoap_config(ss)
except Exception, e:
logging.error(e)
else:
try:
ss = ac.get_stream_setting()
generate_liquidsoap_config(ss)
except Exception, e:
logging.error(str(e))
print "Unable to connect to the Airtime server."
sys.exit(1)