Skip to content

Commit 6d41f07

Browse files
committed
Handle BlobOutput name in LabThings 0.0.6
1 parent f425b77 commit 6d41f07

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

pi-deployment/api/things/camera_thing.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414
except ModuleNotFoundError: # pragma: no cover - older labthings versions
1515
class InvocationError(RuntimeError):
1616
"""Fallback invocation error for older labthings-fastapi versions."""
17-
from labthings_fastapi.outputs.blob import Blob
17+
try:
18+
from labthings_fastapi.outputs.blob import Blob
19+
except ImportError: # pragma: no cover - labthings-fastapi 0.0.6
20+
from labthings_fastapi.outputs.blob import BlobOutput as Blob
1821

1922
from config import (
2023
CMD_SET_RESOLUTION,

software/api/things/camera_thing.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414
except ModuleNotFoundError: # pragma: no cover - older labthings versions
1515
class InvocationError(RuntimeError):
1616
"""Fallback invocation error for older labthings-fastapi versions."""
17-
from labthings_fastapi.outputs.blob import Blob
17+
try:
18+
from labthings_fastapi.outputs.blob import Blob
19+
except ImportError: # pragma: no cover - labthings-fastapi 0.0.6
20+
from labthings_fastapi.outputs.blob import BlobOutput as Blob
1821

1922
from config import (
2023
CMD_SET_RESOLUTION,

0 commit comments

Comments
 (0)