Skip to content

Commit 66c68ab

Browse files
authored
Merge pull request #83 from dihm/fix_docs_build
Prevent starting a zlock server when importing `h5_lock` on RTD.
2 parents 7a3d58c + 27501a3 commit 66c68ab

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)