Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Autopep8
  • Loading branch information
anitagraser committed May 29, 2018
1 parent f314653 commit 1ed5bb5
Showing 1 changed file with 1 addition and 2 deletions.
Expand Up @@ -85,7 +85,7 @@ def processAlgorithm(self, parameters, context, feedback):
uri = postgis.uri_from_name(connection)
sql = self.parameterAsString(parameters, self.SQL, context)
sql = sql.replace('\n', ' ')
uri.setDataSource("", "("+sql+")", "geom", "", "id")
uri.setDataSource("", "(" + sql + ")", "geom", "", "id")

vlayer = QgsVectorLayer(uri.uri(), "layername", "postgres")

Expand All @@ -101,4 +101,3 @@ def processAlgorithm(self, parameters, context, feedback):
self.OUTPUT))

return {self.OUTPUT: vlayer.id()}

0 comments on commit 1ed5bb5

Please sign in to comment.