diff options
author | Operator on Eaditobol <hardware@avencall.com> | 2013-02-08 05:15:46 -0500 |
---|---|---|
committer | Operator on Eaditobol <hardware@avencall.com> | 2013-02-08 05:15:46 -0500 |
commit | 8fd01ffe9d4b8441899f7c59d34a1e67a9bcdef0 (patch) | |
tree | 20d434f91c3bb6ce94d7c2b49c3eb2978b759110 | |
parent | 828f5ce4a5bb65f71f945067f755eddb6e4f113e (diff) |
[fix] save to database
-rwxr-xr-x | gui/util.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gui/util.py b/gui/util.py index 08f5e20..b554279 100755 --- a/gui/util.py +++ b/gui/util.py @@ -213,7 +213,7 @@ class MainWindow(QMainWindow, Ui_MainWindow): self.statusbar.showMessage("Saving to database...") QCoreApplication.processEvents() - savePwrSeqName(config.nextSerial, config.firmware) + savePwrSeqName(self.serialNumberSpinBox.value(), config.firmware) self.statusbar.showMessage("MSP430 programmed successfuly") self.textBrowser.clear() @@ -262,7 +262,7 @@ class MainWindow(QMainWindow, Ui_MainWindow): self.statusbar.showMessage("Saving to database...") QCoreApplication.processEvents() - saveCorebootName(config.nextSerial, config.rom) + saveCorebootName(self.serialNumberSpinBox.value(), config.rom) # Commit in Git @@ -294,9 +294,10 @@ def _saveName(field, serial, name): import sqlite3 conn = sqlite3.connect(config.database) c = conn.cursor() - print 'UPDATE xioh_data SET '+field+' = ? WHERE serial_number=?', (name,serial) + print('UPDATE xioh_data SET '+field+' = ? WHERE serial_number=?', (name,serial)) c.execute('UPDATE xioh_data SET '+field+' = ? WHERE serial_number=?', (name,serial)) conn.commit() + print("Number of changes:", conn.total_changes) c.close() def saveCorebootName(serial, name): _saveName("coreboot_version", serial, name) |