Removed usesless try catch from send_media_monitor_requests.
This commit is contained in:
parent
35a9e77062
commit
31a7b8f943
|
@ -422,15 +422,13 @@ class AirtimeApiClient():
|
||||||
|
|
||||||
def send_media_monitor_requests(self, action_list, dry=False):
|
def send_media_monitor_requests(self, action_list, dry=False):
|
||||||
"""
|
"""
|
||||||
Send a gang of media monitor events at a time. actions_list is a list
|
Send a gang of media monitor events at a time. actions_list is a
|
||||||
of dictionaries where every dictionary is representing an action. Every
|
list of dictionaries where every dictionary is representing an
|
||||||
action dict must contain a 'mode' key that says what kind of action it
|
action. Every action dict must contain a 'mode' key that says
|
||||||
is and an optional 'is_record' key that says whether the show was
|
what kind of action it is and an optional 'is_record' key that
|
||||||
recorded or not. The value of this key does not matter, only if it's
|
says whether the show was recorded or not. The value of this key
|
||||||
present or not.
|
does not matter, only if it's present or not.
|
||||||
"""
|
"""
|
||||||
logger = self.logger
|
|
||||||
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
|
||||||
# that every dictionary represents the metadata of a file along
|
# that every dictionary represents the metadata of a file along
|
||||||
|
@ -464,11 +462,6 @@ class AirtimeApiClient():
|
||||||
response = self.get_response_from_server(req)
|
response = self.get_response_from_server(req)
|
||||||
response = json.loads(response)
|
response = json.loads(response)
|
||||||
return response
|
return response
|
||||||
except ValueError: raise
|
|
||||||
except Exception, e:
|
|
||||||
logger.error('Exception: %s', e)
|
|
||||||
logger.error("traceback: %s", traceback.format_exc())
|
|
||||||
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…
Reference in New Issue