gdaltools: cleanup

This commit is contained in:
Giuseppe Sucameli 2013-06-27 22:52:46 +02:00
parent df4fc99e83
commit dd406dce3e
3 changed files with 6 additions and 6 deletions

View File

@ -207,7 +207,7 @@ class GdalToolsBaseDialog(QDialog, Ui_Dialog):
# 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:
@ -222,7 +222,7 @@ class GdalToolsBaseDialog(QDialog, Ui_Dialog):
#if m.contains( QRegExp( "0(?:\\.+[1-9]0{1,2})+" ) ):
# continue
if not msg == '':
if msg:
msg += "\n"
msg += m

View File

@ -108,8 +108,8 @@ class GdalToolsDialog(QWidget, Ui_Widget, BasePluginWidget):
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):

View File

@ -103,9 +103,9 @@ class GdalToolsDialog( QWidget, Ui_Widget, BasePluginWidget ):
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 ):