Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[processing] GRASS: prevent exception when deleting GISBASE env variable
  • Loading branch information
volaya committed Oct 1, 2015
1 parent ae71e1f commit 87d8a12
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion python/plugins/processing/algs/grass/GrassUtils.py
Expand Up @@ -251,7 +251,8 @@ def prepareGrassExecution(commands):
env['GISRC'] = gisrc
env['GRASS_MESSAGE_FORMAT'] = 'gui'
env['GRASS_BATCH_JOB'] = GrassUtils.grassBatchJobFilename()
del env['GISBASE']
if 'GISBASE' in env:
del env['GISBASE']
GrassUtils.createGrassBatchJobFileFromGrassCommands(commands)
os.chmod(GrassUtils.grassBatchJobFilename(), stat.S_IEXEC
| stat.S_IREAD | stat.S_IWRITE)
Expand Down
3 changes: 2 additions & 1 deletion python/plugins/processing/algs/grass7/Grass7Utils.py
Expand Up @@ -249,7 +249,8 @@ def prepareGrass7Execution(commands):
env['GISRC'] = gisrc
env['GRASS_MESSAGE_FORMAT'] = 'plain'
env['GRASS_BATCH_JOB'] = Grass7Utils.grassBatchJobFilename()
del env['GISBASE']
if 'GISBASE' in env:
del env['GISBASE']
Grass7Utils.createGrass7BatchJobFileFromGrass7Commands(commands)
os.chmod(Grass7Utils.grassBatchJobFilename(), stat.S_IEXEC
| stat.S_IREAD | stat.S_IWRITE)
Expand Down

0 comments on commit 87d8a12

Please sign in to comment.