Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[processing] Add 'call' statements to SAGA batch file
  • Loading branch information
volaya committed Mar 20, 2019
1 parent 5dd29ee commit 08c8f9a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions python/plugins/processing/algs/saga/SagaUtils.py
Expand Up @@ -109,7 +109,10 @@ def createSagaBatchJobFileFromSagaCommands(commands):
else:
pass
for command in commands:
fout.write('saga_cmd ' + command + '\n')
if isWindows():
fout.write('call saga_cmd ' + command + '\n')
else:
fout.write('saga_cmd ' + command + '\n')

fout.write('exit')

Expand Down Expand Up @@ -163,8 +166,8 @@ def executeSaga(feedback):
if isWindows():
command = ['cmd.exe', '/C ', sagaBatchJobFilename()]
else:
os.chmod(sagaBatchJobFilename(), stat.S_IEXEC |
stat.S_IREAD | stat.S_IWRITE)
os.chmod(sagaBatchJobFilename(), stat.S_IEXEC
| stat.S_IREAD | stat.S_IWRITE)
command = ["'" + sagaBatchJobFilename() + "'"]
loglines = []
loglines.append(QCoreApplication.translate('SagaUtils', 'SAGA execution console output'))
Expand Down

0 comments on commit 08c8f9a

Please sign in to comment.