Skip to content

Commit bb0e3a0

Browse files
authored
fix(api): ignore missing aionotify more properly (#8154)
1 parent d9c7ed2 commit bb0e3a0

File tree

4 files changed

+3
-7
lines changed

4 files changed

+3
-7
lines changed

api/src/opentrons/hardware_control/controller.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from typing_extensions import Final
88
try:
99
import aionotify # type: ignore
10-
except OSError:
10+
except (OSError, ModuleNotFoundError):
1111
aionotify = None # type: ignore
1212

1313
from opentrons.drivers.smoothie_drivers import driver_3_0

api/tests/opentrons/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
try:
1111
import aionotify
12-
except OSError:
12+
except (OSError, ModuleNotFoundError):
1313
aionotify = None # type: ignore
1414
import asyncio
1515
import os

api/tests/opentrons/hardware_control/test_instruments.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from unittest import mock
33
try:
44
import aionotify
5-
except OSError:
5+
except (OSError, ModuleNotFoundError):
66
aionotify = None # type: ignore
77
import pytest
88
import typeguard

api/tests/opentrons/hardware_control/test_modules.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
from pathlib import Path
33
from unittest import mock
44
import pytest
5-
try:
6-
import aionotify
7-
except OSError:
8-
aionotify = None # type: ignore
95
from opentrons.hardware_control import ExecutionManager
106
from opentrons.hardware_control.modules import ModuleAtPort
117
from opentrons.hardware_control.modules.types import (

0 commit comments

Comments
 (0)