Skip to content

Commit

Permalink
[processing] xrange() removed, should use range() instead
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy authored and volaya committed Dec 1, 2016
1 parent 3e7b262 commit 781ebd9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/RasterCalculator.py
Expand Up @@ -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
Expand Down
Expand Up @@ -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)
Expand All @@ -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)

Expand Down

0 comments on commit 781ebd9

Please sign in to comment.