Skip to content

Commit 37aa2ca

Browse files
committed
Swap over of imp import check to default to older behavior if available.
1 parent 851f354 commit 37aa2ca

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

labscript_utils/device_registry/_device_registry.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
# deal with removal of imp from python 3.12
1010
try:
11-
import _imp as imp
12-
except ImportError:
1311
import imp
12+
except ImportError:
13+
import _imp as imp
1414

1515
"""This file contains the machinery for registering and looking up what BLACS tab and
1616
runviewer parser classes belong to a particular labscript device. "labscript device"

labscript_utils/modulewatcher.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919

2020
# deal with removal of imp from python 3.12
2121
try:
22-
import _imp as imp
23-
except ImportError:
2422
import imp
23+
except ImportError:
24+
import _imp as imp
2525

2626

2727
# Directories in which the standard library and installed packages may be located.

0 commit comments

Comments
 (0)