Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Followup to 2a5f262; fix typo and run through autopep8
  • Loading branch information
dakcarto committed Sep 9, 2015
1 parent 2a5f262 commit 1c0b607
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions python/plugins/db_manager/dlg_import_vector.py
Expand Up @@ -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
Expand All @@ -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()
Expand All @@ -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.