Skip to content
Permalink
Browse files

Followup to 2a5f262; fix typo and run through autopep8

  • Loading branch information
dakcarto committed Sep 9, 2015
1 parent 2a5f262 commit 1c0b6077f8bb2c84b317731f8d868eac3d03af02
Showing with 5 additions and 6 deletions.
  1. +5 −6 python/plugins/db_manager/dlg_import_vector.py
@@ -330,10 +330,9 @@ def accept(self):

# 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 @@ def accept(self):
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 @@ def closeEvent(self, event):
if __name__ == '__main__':
import sys

a=QApplication(sys.argv)
dlg=DlgImportVector()
a = QApplication(sys.argv)
dlg = DlgImportVector()
dlg.show()
sys.exit(a.exec_())

0 comments on commit 1c0b607

Please sign in to comment.
You can’t perform that action at this time.