From 27501a3676ddb5fdec452d266c5a5dc546a367bf Mon Sep 17 00:00:00 2001 From: David Meyer Date: Wed, 9 Feb 2022 10:34:22 -0500 Subject: [PATCH] Prevent starting a zlock server when importing `h5_lock` on RTD. --- labscript_utils/h5_lock.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/labscript_utils/h5_lock.py b/labscript_utils/h5_lock.py index ad84a2c..4466074 100644 --- a/labscript_utils/h5_lock.py +++ b/labscript_utils/h5_lock.py @@ -89,6 +89,9 @@ def hack_locks_onto_h5py(): # Monkeypatch h5py so all files are locked: h5py.File = File - -connect_to_zlock_server() -hack_locks_onto_h5py() +if os.environ.get('READTHEDOCS'): + # prevent starting a zlock server on RTD, which always fails + pass +else: + connect_to_zlock_server() + hack_locks_onto_h5py() pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy