mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Followup to 2a5f262; fix typo and run through autopep8
This commit is contained in:
parent
2a5f262beb
commit
1c0b6077f8
@ -330,10 +330,9 @@ class DlgImportVector(QDialog, Ui_Dialog):
|
||||
|
||||
# do the import!
|
||||
ret, errMsg = qgis.core.QgsVectorLayerImport.importLayer(self.inLayer, uri, providerName, outCrs, onlySelected, False, options)
|
||||
False, options)
|
||||
except Exception as e:
|
||||
ret=-1
|
||||
errMsg=unicode(e)
|
||||
ret = -1
|
||||
errMsg = unicode(e)
|
||||
|
||||
finally:
|
||||
# restore input layer crs and encoding
|
||||
@ -343,7 +342,7 @@ class DlgImportVector(QDialog, Ui_Dialog):
|
||||
QApplication.restoreOverrideCursor()
|
||||
|
||||
if ret != 0:
|
||||
output=qgis.gui.QgsMessageViewer()
|
||||
output = qgis.gui.QgsMessageViewer()
|
||||
output.setTitle(self.tr("Import to database"))
|
||||
output.setMessageAsPlainText(self.tr("Error %d\n%s") % (ret, errMsg))
|
||||
output.showMessage()
|
||||
@ -366,7 +365,7 @@ class DlgImportVector(QDialog, Ui_Dialog):
|
||||
if __name__ == '__main__':
|
||||
import sys
|
||||
|
||||
a=QApplication(sys.argv)
|
||||
dlg=DlgImportVector()
|
||||
a = QApplication(sys.argv)
|
||||
dlg = DlgImportVector()
|
||||
dlg.show()
|
||||
sys.exit(a.exec_())
|
||||
|
Loading…
x
Reference in New Issue
Block a user