From df9964f6cdfcc4c85df14da0f4c4082eb11efdc5 Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Tue, 1 Jun 2021 16:44:59 +0200 Subject: [PATCH] Don't start GUI when building documentation --- python/gui.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/python/gui.py b/python/gui.py index 7f317144..e753b28d 100644 --- a/python/gui.py +++ b/python/gui.py @@ -19,11 +19,9 @@ def StartGUI(): pass if not netgen.libngpy._meshing._netgen_executable_started: - # catch exception for building html docu on server without display - try: + import os + if not "NETGEN_DOCUMENTATION_RST_FORMAT" in os.environ: StartGUI() - except: - pass def Snapshot(w,h, filename=None): netgen.Redraw(blocking=True)