allow creating directories from camera snapshot, stream record, and tensorflow file out (#39728)

This commit is contained in:
Jason Hunter 2020-09-06 18:54:24 -04:00 committed by GitHub
parent 1ec3446c56
commit 1a78d96014
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 1 deletions

View file

@ -328,6 +328,8 @@ class TensorFlowImageProcessor(ImageProcessingEntity):
for path in paths:
_LOGGER.info("Saving results image to %s", path)
if not os.path.exists(os.path.dirname(path)):
os.makedirs(os.path.dirname(path), exist_ok=True)
img.save(path)
def process_image(self, image):