cc-4105: changed error handling from returning none to throwing exception
This commit is contained in:
parent
3e24b71436
commit
a9f6bb3b5c
2 changed files with 7 additions and 8 deletions
|
@ -365,7 +365,6 @@ class AirTimeApiClient():
|
||||||
|
|
||||||
def send_media_monitor_requests(self, action_list, is_record=False):
|
def send_media_monitor_requests(self, action_list, is_record=False):
|
||||||
logger = self.logger
|
logger = self.logger
|
||||||
response = None
|
|
||||||
try:
|
try:
|
||||||
url = self.construct_url('reload_metadata_group')
|
url = self.construct_url('reload_metadata_group')
|
||||||
# We are assuming that action_list is a list of dictionaries such
|
# We are assuming that action_list is a list of dictionaries such
|
||||||
|
@ -402,11 +401,11 @@ class AirTimeApiClient():
|
||||||
response = self.get_response_from_server(url)
|
response = self.get_response_from_server(url)
|
||||||
response = json.loads(response)
|
response = json.loads(response)
|
||||||
logger.info("associate recorded %s", response)
|
logger.info("associate recorded %s", response)
|
||||||
|
return response
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
response = None
|
|
||||||
logger.error('Exception: %s', e)
|
logger.error('Exception: %s', e)
|
||||||
logger.error("traceback: %s", traceback.format_exc())
|
logger.error("traceback: %s", traceback.format_exc())
|
||||||
return response
|
raise
|
||||||
|
|
||||||
#returns a list of all db files for a given directory in JSON format:
|
#returns a list of all db files for a given directory in JSON format:
|
||||||
#{"files":["path/to/file1", "path/to/file2"]}
|
#{"files":["path/to/file1", "path/to/file2"]}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue