Skip to content

Commit dd406dc

Browse files
committedJun 27, 2013
gdaltools: cleanup
1 parent df4fc99 commit dd406dc

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed
 

‎python/plugins/GdalTools/tools/dialogBase.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ def onFinished(self, exitCode, status):
207207
# show the error message if there's one, otherwise show the process output message
208208
msg = str(self.process.readAllStandardError())
209209
if msg == '':
210-
outMessages = string.split( str(self.process.readAllStandardOutput()), sep="\n" )
210+
outMessages = str(self.process.readAllStandardOutput()).splitlines()
211211

212212
# make sure to not show the help
213213
for m in outMessages:
@@ -222,7 +222,7 @@ def onFinished(self, exitCode, status):
222222
#if m.contains( QRegExp( "0(?:\\.+[1-9]0{1,2})+" ) ):
223223
# continue
224224

225-
if not msg == '':
225+
if msg:
226226
msg += "\n"
227227
msg += m
228228

‎python/plugins/GdalTools/tools/doContour.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ def getInputFileName(self):
108108

109109
def getOutputFileName(self):
110110
if self.useDirAsOutput:
111-
fn = self.outSelector.filename()
112-
return fn if not fn else fn + QDir.separator() + "contour.shp"
111+
if self.outSelector.filename():
112+
return self.outSelector.filename() + QDir.separator() + "contour.shp"
113113
return self.outSelector.filename()
114114

115115
def addLayerIntoCanvas(self, fileInfo):

‎python/plugins/GdalTools/tools/doInfo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ def finished( self ):
103103
if platform.system() == "Windows":
104104
#info = QString.fromLocal8Bit( arr ).strip().split( "\r\n" )
105105
# TODO test
106-
info = string.split(arr, sep="\r\n" )
106+
info = arr.splitlines()
107107
else:
108-
info = string.split(arr, sep="\n" )
108+
info = arr.splitlines()
109109
self.rasterInfoList.addItems( info )
110110

111111
def fillInputFileEdit( self ):

0 commit comments

Comments
 (0)
Please sign in to comment.