Skip to content
Permalink
Browse files

fix #6846

  • Loading branch information
brushtyler committed Dec 10, 2012
1 parent b6c999e commit 34a16e246c04144428b07e0fc56ebd2f97a330da
Showing with 5 additions and 3 deletions.
  1. +5 −3 python/plugins/db_manager/dlg_sql_window.py
@@ -191,18 +191,20 @@ def fillColumnCombos(self):
connector = self.db.connector
sql = u"SELECT * FROM (%s\n) AS %s LIMIT 0" % ( unicode(query), connector.quoteId(alias) )

c = None
try:
c = connector._execute(None, sql)
cols = connector._get_cursor_columns(c)

except BaseError, e:
except (BaseError, Warning) as e:
QApplication.restoreOverrideCursor()
DlgDbError.showError(e, self)
return

finally:
c.close()
del c
if c:
c.close()
del c

cols.sort()
self.uniqueCombo.addItems( cols )

0 comments on commit 34a16e2

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