Navigation Menu

Skip to content

Commit

Permalink
fix #6846
Browse files Browse the repository at this point in the history
  • Loading branch information
brushtyler committed Dec 10, 2012
1 parent b6c999e commit 34a16e2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions python/plugins/db_manager/dlg_sql_window.py
Expand Up @@ -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 )
Expand Down

0 comments on commit 34a16e2

Please sign in to comment.