Skip to content

Commit c8d3fa7

Browse files
committed
gdaltools: fix Translate/FillNodata batch mode (follo df4fc99)
1 parent d147495 commit c8d3fa7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

python/plugins/GdalTools/tools/doFillNodata.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,8 @@ def updateProgress(self, index, total):
206206

207207
def batchRun(self):
208208
exts = re.sub('\).*$', '', re.sub('^.*\(', '', self.formatCombo.currentText())).split(" ")
209-
if exts and exts != "*" and exts != "*.*":
210-
outExt = exts[ 0 ].remove( "*" )
209+
if len(exts) > 0 and exts[0] != "*" and exts[0] != "*.*":
210+
outExt = exts[0].replace( "*", "" )
211211
else:
212212
outExt = ".tif"
213213

python/plugins/GdalTools/tools/doTranslate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,8 @@ def updateProgress(self, index, total):
277277

278278
def batchRun(self):
279279
exts = re.sub('\).*$', '', re.sub('^.*\(', '', self.formatCombo.currentText())).split(" ")
280-
if exts and exts != "*" and exts != "*.*":
281-
outExt = exts[ 0 ].remove( "*" )
280+
if len(exts) > 0 and exts[0] != "*" and exts[0] != "*.*":
281+
outExt = exts[0].replace( "*", "" )
282282
else:
283283
outExt = ".tif"
284284

0 commit comments

Comments
 (0)