Skip to content

Commit 27501a3

Browse files
committed
Prevent starting a zlock server when importing h5_lock on RTD.
1 parent 7a3d58c commit 27501a3

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

labscript_utils/h5_lock.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ def hack_locks_onto_h5py():
8989
# Monkeypatch h5py so all files are locked:
9090
h5py.File = File
9191

92-
93-
connect_to_zlock_server()
94-
hack_locks_onto_h5py()
92+
if os.environ.get('READTHEDOCS'):
93+
# prevent starting a zlock server on RTD, which always fails
94+
pass
95+
else:
96+
connect_to_zlock_server()
97+
hack_locks_onto_h5py()

0 commit comments

Comments
 (0)