Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use logging in gmsh runner
  • Loading branch information
inducer committed Jun 23, 2014
1 parent 78c566c commit 7f08a8f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions meshpy/gmsh.py
@@ -1,3 +1,7 @@
import logging
logger = logging.getLogger(__name__)


class GmshError(RuntimeError):
pass

Expand Down Expand Up @@ -101,9 +105,11 @@ def __enter__(self):
cmdline.extend(self.other_options)
cmdline.append(source_file_name)

logger.info("invoking gmsh: '%s'" % " ".join(cmdline))
from pytools.prefork import call_capture_output
retcode, stdout, stderr = call_capture_output(
cmdline, working_dir)
logger.info("return from gmsh")

if stderr and "error" in stderr.lower():
msg = "gmsh execution failed with message:\n\n"
Expand Down

0 comments on commit 7f08a8f

Please sign in to comment.