Skip to content
Permalink
Browse files

[processing] GRASS: prevent exception when deleting GISBASE env variable

  • Loading branch information
volaya committed Oct 1, 2015
1 parent ae71e1f commit 87d8a12e79a4c889d72245fb2b3ba22100aab59f
@@ -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)
@@ -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)

0 comments on commit 87d8a12

Please sign in to comment.
You can’t perform that action at this time.