From 710c92715e1c6084c7a6e7c4822ec967cde2893a Mon Sep 17 00:00:00 2001 From: Jonathan Guyer Date: Tue, 23 Nov 2021 14:51:30 -0500 Subject: [PATCH 1/2] Ignore build/ directory --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 6c683d767a..79894f1f7b 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ worktrees/ dictionary.dic en_US.aff en_US.dic +build/ From 94c2954a8cae8ce9815a2c2e6da2b197f66c3da9 Mon Sep 17 00:00:00 2001 From: Jonathan Guyer Date: Fri, 18 Mar 2022 15:42:04 -0400 Subject: [PATCH 2/2] Extract version from stdout in recent Gmsh --- fipy/meshes/gmshMesh.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fipy/meshes/gmshMesh.py b/fipy/meshes/gmshMesh.py index 50b7355822..e0cd4a0f88 100755 --- a/fipy/meshes/gmshMesh.py +++ b/fipy/meshes/gmshMesh.py @@ -68,6 +68,7 @@ def gmshVersion(communicator=parallelComm): while True: try: # gmsh returns version in stderr (Why?!?) + # (newer versions of gmsh return the version in stdout) # spyder on Windows throws # OSError: [WinError 6] The handle is invalid # if we don't PIPE stdout, too @@ -77,8 +78,11 @@ def gmshVersion(communicator=parallelComm): break try: - out, verStr = p.communicate() - verStr = verStr.decode('ascii').strip() + out, err = p.communicate() + verStr = err.decode('ascii').strip() + if not verStr: + # newer versions of gmsh return the version in stdout + verStr = out.decode('ascii').strip() break except IOError: # some weird conflict with things like PyQT can cause