Skip to content
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions algorithms/ili2pg_algorithms.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,8 @@ def initAlgorithm(self, config=None):
self.ILIMODELS,
self.tr('Interlis models')))
self.addParameter(QgsProcessingParameterFileDestination(
self.XTF, description="Interlis transfer output file"))
self.OUTPUT,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why rename the parameter here? Does it have to be named OUTPUT?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it does not. But looking in the docs and in other Python processing algs, it seems to be kind of a convention to name the output parameter OUTPUT. Technically it doesn't matter.

self.tr('Interlis transfer output file')))
# ext: xtf, xml, itf

def processAlgorithm(self, parameters, context, feedback):
Expand All @@ -486,11 +487,11 @@ def processAlgorithm(self, parameters, context, feedback):
if models:
ili2dbargs.extend(["--models", models])

xtf = parameters.get(self.XTF)
xtf = parameters.get(self.OUTPUT)
ili2dbargs.append(xtf)

IliUtils.runJava(
ProcessingConfig.getSetting(IliUtils.ILI2PG_JAR),
ili2dbargs)

return {}
return { self.OUTPUT: xtf }