Skip to content

Commit c321522

Browse files
committed
[processing] Add 'call' statements to SAGA batch file
1 parent 567da1b commit c321522

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

python/plugins/processing/algs/saga/SagaUtils.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,10 @@ def createSagaBatchJobFileFromSagaCommands(commands):
109109
else:
110110
pass
111111
for command in commands:
112-
fout.write('saga_cmd ' + command + '\n')
112+
if isWindows():
113+
fout.write('call saga_cmd ' + command + '\n')
114+
else:
115+
fout.write('saga_cmd ' + command + '\n')
113116

114117
fout.write('exit')
115118

@@ -163,8 +166,8 @@ def executeSaga(feedback):
163166
if isWindows():
164167
command = ['cmd.exe', '/C ', sagaBatchJobFilename()]
165168
else:
166-
os.chmod(sagaBatchJobFilename(), stat.S_IEXEC |
167-
stat.S_IREAD | stat.S_IWRITE)
169+
os.chmod(sagaBatchJobFilename(), stat.S_IEXEC
170+
| stat.S_IREAD | stat.S_IWRITE)
168171
command = ["'" + sagaBatchJobFilename() + "'"]
169172
loglines = []
170173
loglines.append(QCoreApplication.translate('SagaUtils', 'SAGA execution console output'))

0 commit comments

Comments
 (0)