Skip to content

Commit 781ebd9

Browse files
alexbruyvolaya
authored andcommittedDec 1, 2016
[processing] xrange() removed, should use range() instead
1 parent 3e7b262 commit 781ebd9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
 

‎python/plugins/processing/algs/qgis/RasterCalculator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def processAlgorithm(self, progress):
103103

104104
entries = []
105105
for name, lyr in layersDict.items():
106-
for n in xrange(lyr.bandCount()):
106+
for n in range(lyr.bandCount()):
107107
entry = QgsRasterCalculatorEntry()
108108
entry.ref = '{:s}@{:d}'.format(name, n + 1)
109109
entry.raster = lyr

‎python/plugins/processing/algs/qgis/ui/RasterCalculatorWidgets.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def createWidget(self):
6060
layers = dataobjects.getRasterLayers(sorting=False)
6161
options = {}
6262
for lyr in layers:
63-
for n in xrange(lyr.bandCount()):
63+
for n in range(lyr.bandCount()):
6464
name = '{:s}@{:d}'.format(lyr.name(), n + 1)
6565
options[name] = name
6666
return self._panel(options)
@@ -75,7 +75,7 @@ def refresh(self):
7575
layers = dataobjects.getRasterLayers()
7676
options = {}
7777
for lyr in layers:
78-
for n in xrange(lyr.bandCount()):
78+
for n in range(lyr.bandCount()):
7979
options[lyr.name()] = '{:s}@{:d}'.format(lyr.name(), n + 1)
8080
self.widget.setList(options)
8181

0 commit comments

Comments
 (0)
Please sign in to comment.