Changeset 25100 for issm/trunk-jpl/src/m/mesh/planet/gmsh/gmshplanet.py
- Timestamp:
- 06/22/20 11:39:17 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/mesh/planet/gmsh/gmshplanet.py
r25099 r25100 26 26 27 27 # Get Gmsh version 28 args = "gmsh -info | grep 'Version' | sed -e 's/Version[[:blank:]]*:[[:blank:]]//' | cut -d '.' -f1"29 proc = subprocess.Popen(args, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)30 outs, errs = proc.communicate()28 subproc_args = "gmsh -info | grep 'Version' | sed -e 's/Version[[:blank:]]*:[[:blank:]]//' | cut -d '.' -f1" 29 subproc = subprocess.Popen(subproc_args, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) 30 outs, errs = subproc.communicate() 31 31 if errs != '': 32 32 raise Exception("gmshplanet: call to gmsh failed: {}".format(errs)) 33 33 gmshmajorversion = int(outs) 34 34 if gmshmajorversion not in [3, 4]: 35 raise RuntimeError("gmshplanet: Gmsh major version {} not supported!".format( 35 raise RuntimeError("gmshplanet: Gmsh major version {} not supported!".format(gmshmajorversion)) 36 36 37 37 #process options
Note:
See TracChangeset
for help on using the changeset viewer.