Tighten up allocation excaption catching
This commit is contained in:
parent
3357fefbb0
commit
b49083177b
1 changed files with 6 additions and 6 deletions
|
|
@ -91,7 +91,7 @@ for quality in range(2,55): #valid range is 2 to 54 inclusive
|
|||
b = bytearray(cam.capture_buffer_size)
|
||||
print(f"Quality {quality} successfully selected.")
|
||||
break
|
||||
except Exception:
|
||||
except MemoryError:
|
||||
print(f"Quality {quality} was too big. Trying next lowest.")
|
||||
|
||||
if b is None:
|
||||
|
|
|
|||
Loading…
Reference in a new issue