Fix bad check on np.array

This commit is contained in:
Nicolas Mowen 2023-06-30 06:50:03 -06:00 committed by GitHub
parent 0a8249d6fb
commit db8bf6f2cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1118,7 +1118,7 @@ def latest_frame(camera_name):
height = int(request.args.get("h", str(frame.shape[0])))
width = int(height * frame.shape[1] / frame.shape[0])
if not frame:
if frame is None:
return "Unable to get valid frame from {}".format(camera_name), 500
if height < 1 or width < 1: