Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 08c8f9a

Browse files
committedMar 20, 2019
[processing] Add 'call' statements to SAGA batch file
1 parent 5dd29ee commit 08c8f9a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed
 

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

Lines changed: 6 additions & 3 deletions
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)
Please sign in to comment.