cc-2055: switch-to-init.d

-return proper return value when exception is raised in recorder.py
This commit is contained in:
martin 2011-06-02 11:36:30 -04:00
parent bfb5dc4e58
commit 48e05e4b7f
2 changed files with 12 additions and 14 deletions

View file

@ -318,6 +318,7 @@ class AirTimeApiClient(ApiClientInterface):
except Exception, e:
logger.error("Exception: %s", e)
response = None
return response

View file

@ -166,17 +166,14 @@ class Record():
def get_shows(self):
shows = self.api_client.get_shows_to_record()
response = self.api_client.get_shows_to_record()
if response is not None and 'is_recording' in response:
if self.sr is not None:
if not shows['is_recording'] and self.sr.is_recording():
if not response['is_recording'] and self.sr.is_recording():
self.sr.cancel_recording()
if shows is not None:
shows = shows[u'shows']
else:
shows = []
shows = response[u'shows']
if len(shows):
self.process_shows(shows)