Skip to content
Permalink
Browse files
[processing] xrange() removed, should use range() instead
  • Loading branch information
alexbruy authored and volaya committed Dec 1, 2016
1 parent 3e7b262 commit 781ebd9a69f8fdb64888a46f98c31f29a5fd9225
Showing with 3 additions and 3 deletions.
  1. +1 −1 python/plugins/processing/algs/qgis/RasterCalculator.py
  2. +2 −2 python/plugins/processing/algs/qgis/ui/RasterCalculatorWidgets.py
@@ -103,7 +103,7 @@ def processAlgorithm(self, progress):

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
@@ -60,7 +60,7 @@ def createWidget(self):
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 @@ def refresh(self):
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)

0 comments on commit 781ebd9

Please sign in to comment.