Skip to content

Commit

Permalink
d.mon: fix debug call
Browse files Browse the repository at this point in the history
  • Loading branch information
petrasovaa authored and neteler committed Sep 7, 2019
1 parent 8cf7402 commit 2ff8442
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions display/d.mon/render_cmd.py
Expand Up @@ -5,6 +5,7 @@

from grass.script import core as grass
from grass.script import task as gtask
from grass.exceptions import CalledModuleError

# read environment variables from file
def read_env_file(env_file):
Expand Down Expand Up @@ -39,8 +40,8 @@ def render(cmd, mapfile):
env['GRASS_RENDER_FILE'] = mapfile
try:
grass.run_command(cmd[0], env=env, **cmd[1])
except Exception as e:
grass.debug(1, "Unable to render: {0}".format(e))
except CalledModuleError as e:
grass.debug("Unable to render: {0}".format(e), 1)

# update cmd file
def update_cmd_file(cmd_file, cmd, mapfile):
Expand Down

0 comments on commit 2ff8442

Please sign in to comment.