Skip to content

Commit 681f73a

Browse files
committedNov 1, 2018
fixed some PEP8 issues
1 parent 8976f68 commit 681f73a

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed
 

‎python/plugins/processing/algs/gdal/extractprojection.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,18 @@ def __init__(self):
5252

5353
def initAlgorithm(self, config=None):
5454
self.addParameter(QgsProcessingParameterRasterLayer(
55-
self.INPUT,
56-
self.tr('Input file')))
55+
self.INPUT,
56+
self.tr('Input file')))
5757
self.addParameter(QgsProcessingParameterBoolean(
58-
self.PRJ_FILE_CREATE,
59-
self.tr('Create also .prj file'), False))
60-
self.addOutput(QgsProcessingOutputFile(self.WORLD_FILE,
61-
self.tr('World file')))
58+
self.PRJ_FILE_CREATE,
59+
self.tr('Create also .prj file'), False))
6260
self.addOutput(QgsProcessingOutputFile(
63-
self.PRJ_FILE,
64-
self.tr('ESRI Shapefile prj file')))
65-
61+
self.WORLD_FILE,
62+
self.tr('World file')))
63+
self.addOutput(QgsProcessingOutputFile(
64+
self.PRJ_FILE,
65+
self.tr('ESRI Shapefile prj file')))
66+
6667
def name(self):
6768
return 'extractprojection'
6869

@@ -93,7 +94,7 @@ def processAlgorithm(self, parameters, context, feedback):
9394
raster = self.parameterAsRasterLayer(parameters, self.INPUT,
9495
context)
9596
if not raster.dataProvider().name() == 'gdal':
96-
raise QgsProcessingException('This algorithm can only '\
97+
raise QgsProcessingException('This algorithm can only '
9798
'be used with GDAL raster layers')
9899
rasterPath = raster.source()
99100
rasterDS = gdal.Open(rasterPath, gdal.GA_ReadOnly)
@@ -116,7 +117,7 @@ def processAlgorithm(self, parameters, context, feedback):
116117
with open(outFileName + '.prj', 'wt') as prj:
117118
prj.write(crs)
118119
results[self.PRJ_FILE] = outFileName + '.prj'
119-
else:
120+
else:
120121
results[self.PRJ_FILE] = None
121122

122123
with open(outFileName + '.wld', 'wt') as wld:

0 commit comments

Comments
 (0)
Please sign in to comment.