Commit ef319810 authored by mancini's avatar mancini

Python3 update

parent 2adc5096
#!/usr/bin/python
#!/usr/bin/python3
import sys
import lib.stager_access as sa
import logging
......@@ -37,7 +37,7 @@ class Stager(QObject):
sa.reschedule_on_hold()
logger.info('rescheduling succeded ')
except Exception as e:
logger.warning('an error occurred', e)
logger.warning('an error occurred %s', e)
class MainWindow(QMainWindow, Ui_MainWindow):
def __init__(self, parent=None):
......@@ -46,6 +46,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self.setupUi(self)
self.stager = Stager()
self.setWindowTitle('Stager')
self.timerDataUpdate = QTimer(self)
self.timerDataUpdate.setInterval(1 * 60 * 1000)
......@@ -84,12 +85,12 @@ class MainWindow(QMainWindow, Ui_MainWindow):
row_content = items[id]
row_content.update(export_id=id)
for column, column_text in enumerate(columns_header):
item = QTableWidgetItem(str(row_content[column_text]))
item = QTableWidgetItem(str(row_content.get(column_text, 'missing')))
self.table_view.setItem(row, column, item)
self.statusbar.showMessage('ready')
except Exception as e:
logger.exception(e)
self.statusbar.showMessage('error: %s', str(e))
self.statusbar.showMessage('error: %s' % str(e))
self.trigger_update()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment