Handle empty or malformed capture list
This commit is contained in:
parent
ebce044fc2
commit
2cdc20b08e
1 changed files with 4 additions and 3 deletions
|
|
@ -251,9 +251,10 @@ class BaseCamera(object):
|
|||
# Create capture object list, and validate captures
|
||||
capture_list = []
|
||||
|
||||
for capture_dict in capture_dict_list:
|
||||
if 'path' in capture_dict and os.path.isfile(capture_dict['path']):
|
||||
capture_list.append(capture_from_dict(capture_dict))
|
||||
if capture_dict_list:
|
||||
for capture_dict in capture_dict_list:
|
||||
if 'path' in capture_dict and os.path.isfile(capture_dict['path']):
|
||||
capture_list.append(capture_from_dict(capture_dict))
|
||||
|
||||
return capture_list
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue