Fix typo in sql exception handling

This commit is contained in:
Ryan Roden-Corrent 2017-06-06 21:40:17 -04:00
parent 6a0fc5afd2
commit 5b827cf86a

View File

@ -81,8 +81,8 @@ class Query(QSqlQuery):
self.addBindValue(val) self.addBindValue(val)
log.sql.debug('self bindings: {}'.format(self.boundValues())) log.sql.debug('self bindings: {}'.format(self.boundValues()))
if not self.exec_(): if not self.exec_():
raise SqlException('Failed to exec self "{}": "{}"'.format( raise SqlException('Failed to exec query "{}": "{}"'.format(
self.lastself(), self.lastError().text())) self.lastQuery(), self.lastError().text()))
def value(self): def value(self):
"""Return the result of a single-value query (e.g. an EXISTS).""" """Return the result of a single-value query (e.g. an EXISTS)."""