Skip to content

Commit

Permalink
fixed some PEP8 issues
Browse files Browse the repository at this point in the history
  • Loading branch information
havatv committed Nov 1, 2018
1 parent 8976f68 commit 681f73a
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions python/plugins/processing/algs/gdal/extractprojection.py
Expand Up @@ -52,17 +52,18 @@ def __init__(self):

def initAlgorithm(self, config=None):
self.addParameter(QgsProcessingParameterRasterLayer(
self.INPUT,
self.tr('Input file')))
self.INPUT,
self.tr('Input file')))
self.addParameter(QgsProcessingParameterBoolean(
self.PRJ_FILE_CREATE,
self.tr('Create also .prj file'), False))
self.addOutput(QgsProcessingOutputFile(self.WORLD_FILE,
self.tr('World file')))
self.PRJ_FILE_CREATE,
self.tr('Create also .prj file'), False))
self.addOutput(QgsProcessingOutputFile(
self.PRJ_FILE,
self.tr('ESRI Shapefile prj file')))

self.WORLD_FILE,
self.tr('World file')))
self.addOutput(QgsProcessingOutputFile(
self.PRJ_FILE,
self.tr('ESRI Shapefile prj file')))

def name(self):
return 'extractprojection'

Expand Down Expand Up @@ -93,7 +94,7 @@ def processAlgorithm(self, parameters, context, feedback):
raster = self.parameterAsRasterLayer(parameters, self.INPUT,
context)
if not raster.dataProvider().name() == 'gdal':
raise QgsProcessingException('This algorithm can only '\
raise QgsProcessingException('This algorithm can only '
'be used with GDAL raster layers')
rasterPath = raster.source()
rasterDS = gdal.Open(rasterPath, gdal.GA_ReadOnly)
Expand All @@ -116,7 +117,7 @@ def processAlgorithm(self, parameters, context, feedback):
with open(outFileName + '.prj', 'wt') as prj:
prj.write(crs)
results[self.PRJ_FILE] = outFileName + '.prj'
else:
else:
results[self.PRJ_FILE] = None

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

0 comments on commit 681f73a

Please sign in to comment.