[processing] xrange() removed, should use range() instead

This commit is contained in:
Alexander Bruy 2016-11-17 21:52:18 +02:00 committed by volaya
parent 3e7b26233e
commit 781ebd9a69
2 changed files with 3 additions and 3 deletions

View File

@ -103,7 +103,7 @@ class RasterCalculator(GeoAlgorithm):
entries = []
for name, lyr in layersDict.items():
for n in xrange(lyr.bandCount()):
for n in range(lyr.bandCount()):
entry = QgsRasterCalculatorEntry()
entry.ref = '{:s}@{:d}'.format(name, n + 1)
entry.raster = lyr

View File

@ -60,7 +60,7 @@ class ExpressionWidgetWrapper(WidgetWrapper):
layers = dataobjects.getRasterLayers(sorting=False)
options = {}
for lyr in layers:
for n in xrange(lyr.bandCount()):
for n in range(lyr.bandCount()):
name = '{:s}@{:d}'.format(lyr.name(), n + 1)
options[name] = name
return self._panel(options)
@ -75,7 +75,7 @@ class ExpressionWidgetWrapper(WidgetWrapper):
layers = dataobjects.getRasterLayers()
options = {}
for lyr in layers:
for n in xrange(lyr.bandCount()):
for n in range(lyr.bandCount()):
options[lyr.name()] = '{:s}@{:d}'.format(lyr.name(), n + 1)
self.widget.setList(options)