Skip to content

Commit

Permalink
gdaltools: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
brushtyler committed Jun 27, 2013
1 parent df4fc99 commit dd406dc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions python/plugins/GdalTools/tools/dialogBase.py
Expand Up @@ -207,7 +207,7 @@ def onFinished(self, exitCode, status):
# show the error message if there's one, otherwise show the process output message
msg = str(self.process.readAllStandardError())
if msg == '':
outMessages = string.split( str(self.process.readAllStandardOutput()), sep="\n" )
outMessages = str(self.process.readAllStandardOutput()).splitlines()

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

if not msg == '':
if msg:
msg += "\n"
msg += m

Expand Down
4 changes: 2 additions & 2 deletions python/plugins/GdalTools/tools/doContour.py
Expand Up @@ -108,8 +108,8 @@ def getInputFileName(self):

def getOutputFileName(self):
if self.useDirAsOutput:
fn = self.outSelector.filename()
return fn if not fn else fn + QDir.separator() + "contour.shp"
if self.outSelector.filename():
return self.outSelector.filename() + QDir.separator() + "contour.shp"
return self.outSelector.filename()

def addLayerIntoCanvas(self, fileInfo):
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/GdalTools/tools/doInfo.py
Expand Up @@ -103,9 +103,9 @@ def finished( self ):
if platform.system() == "Windows":
#info = QString.fromLocal8Bit( arr ).strip().split( "\r\n" )
# TODO test
info = string.split(arr, sep="\r\n" )
info = arr.splitlines()
else:
info = string.split(arr, sep="\n" )
info = arr.splitlines()
self.rasterInfoList.addItems( info )

def fillInputFileEdit( self ):
Expand Down

0 comments on commit dd406dc

Please sign in to comment.