Skip to content
Permalink
Browse files

osgeo4w: fix b6293f2 (fixes #21210)

  • Loading branch information
jef-n committed Feb 10, 2019
1 parent 29d4496 commit eea4eda6a35f1a06f84f198249b51b169144c46f
@@ -92,9 +92,13 @@ def getConsoleCommands(self, parameters, context, feedback, executing=True):

arguments.append(fileName)

commands = [self.commandName() + '.py', GdalUtils.escapeAndJoin(arguments)]
if isWindows():
commands.insert(0, 'python3')
commands = ["python3", "-m", self.commandName()]
else:
commands = [self.commandName() + '.py']

commands.append(GdalUtils.escapeAndJoin(arguments))

self.setOutputValue(self.OUTPUT, fileName)

return commands
@@ -130,8 +130,11 @@ def getConsoleCommands(self, parameters, context, feedback, executing=True):
arguments.append(raster.source())
arguments.append(out)

commands = [self.commandName() + '.py', GdalUtils.escapeAndJoin(arguments)]
if isWindows():
commands.insert(0, 'python3')
commands = ["python3", "-m", self.commandName()]
else:
commands = [self.commandName() + '.py']

commands.append(GdalUtils.escapeAndJoin(arguments))

return commands
@@ -229,8 +229,11 @@ def getConsoleCommands(self, parameters, context, feedback, executing=True):
arguments.append(inLayer.source())
arguments.append(self.parameterAsString(parameters, self.OUTPUT, context))

commands = [self.commandName() + '.py', GdalUtils.escapeAndJoin(arguments)]
if isWindows():
commands.insert(0, 'python3')
commands = ["python3", "-m", self.commandName()]
else:
commands = [self.commandName() + '.py']

commands.append(GdalUtils.escapeAndJoin(arguments))

return commands
@@ -94,8 +94,11 @@ def getConsoleCommands(self, parameters, context, feedback, executing=True):
arguments.append(raster.source())
arguments.append(self.parameterAsFileOutput(parameters, self.OUTPUT, context))

commands = [self.commandName() + '.py', GdalUtils.escapeAndJoin(arguments)]
if isWindows():
commands.insert(0, 'python3')
commands = ["python3", "-m", self.commandName()]
else:
commands = [self.commandName() + '.py']

commands.append(GdalUtils.escapeAndJoin(arguments))

return commands
@@ -166,8 +166,11 @@ def getConsoleCommands(self, parameters, context, feedback, executing=True):
arguments.append('--optfile')
arguments.append(list_file)

commands = [self.commandName() + '.py', GdalUtils.escapeAndJoin(arguments)]
if isWindows():
commands.insert(0, 'python3')
commands = ["python3", "-m", self.commandName()]
else:
commands = [self.commandName() + '.py']

commands.append(GdalUtils.escapeAndJoin(arguments))

return commands
@@ -103,8 +103,11 @@ def getConsoleCommands(self, parameters, context, feedback, executing=True):
if self.parameterAsBool(parameters, self.RGBA, context):
arguments.append('-rgba')

commands = [self.commandName() + '.py', GdalUtils.escapeAndJoin(arguments)]
if isWindows():
commands.insert(0, 'python3')
commands = ["python3", "-m", self.commandName()]
else:
commands = [self.commandName() + '.py']

commands.append(GdalUtils.escapeAndJoin(arguments))

return commands
@@ -116,8 +116,11 @@ def getConsoleCommands(self, parameters, context, feedback, executing=True):
arguments.append(layerName)
arguments.append(self.parameterAsString(parameters, self.FIELD, context))

commands = [self.commandName() + '.py', GdalUtils.escapeAndJoin(arguments)]
if isWindows():
commands.insert(0, 'python3')
commands = ["python3", "-m", self.commandName()]
else:
commands = [self.commandName() + '.py']

commands.append(GdalUtils.escapeAndJoin(arguments))

return commands
@@ -187,8 +187,11 @@ def getConsoleCommands(self, parameters, context, feedback, executing=True):
arguments.append(inLayer.source())
arguments.append(out)

commands = [self.commandName() + '.py', GdalUtils.escapeAndJoin(arguments)]
if isWindows():
commands.insert(0, 'python3')
commands = ["python3", "-m", self.commandName()]
else:
commands = [self.commandName() + '.py']

commands.append(GdalUtils.escapeAndJoin(arguments))

return commands
@@ -209,8 +209,11 @@ def getConsoleCommands(self, parameters, context, feedback, executing=True):
layers = [l.source() for l in self.parameterAsLayerList(parameters, self.INPUT, context)]
arguments.extend(layers)

commands = [self.commandName() + '.py', GdalUtils.escapeAndJoin(arguments)]
if isWindows():
commands.insert(0, 'python3')
commands = ["python3", "-m", self.commandName()]
else:
commands = [self.commandName() + '.py']

commands.append(GdalUtils.escapeAndJoin(arguments))

return commands
@@ -95,8 +95,11 @@ def getConsoleCommands(self, parameters, context, feedback, executing=True):
arguments.append(raster.source())
arguments.append(out)

commands = [self.commandName() + '.py', GdalUtils.escapeAndJoin(arguments)]
if isWindows():
commands.insert(0, 'python3')
commands = ["python3", "-m", self.commandName()]
else:
commands = [self.commandName() + '.py']

commands.append(GdalUtils.escapeAndJoin(arguments))

return commands
@@ -120,8 +120,11 @@ def getConsoleCommands(self, parameters, context, feedback, executing=True):
arguments.append(raster.source())
arguments.append(out)

commands = [self.commandName() + '.py', GdalUtils.escapeAndJoin(arguments)]
if isWindows():
commands.insert(0, 'python3')
commands = ["python3", "-m", self.commandName()]
else:
commands = [self.commandName() + '.py']

commands.append(GdalUtils.escapeAndJoin(arguments))

return commands

0 comments on commit eea4eda

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