GUI fixes
- do not show command result dialog when result is None - apply fmtstr, if available + fix io import in secop.core + change old style <basecls>.__init__(self, ...) calls to super().__init__(...) Change-Id: I599d5d8e8ff430ea9454a0858d703290e87454fc Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/26397 Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de> Reviewed-by: Jens Krueger <jens.krueger@frm2.tum.de> Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de> Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
This commit is contained in:
@ -44,7 +44,7 @@ class QSECNode(QObject):
|
||||
logEntry = pyqtSignal(str)
|
||||
|
||||
def __init__(self, uri, parent=None):
|
||||
QObject.__init__(self, parent)
|
||||
super().__init__(parent)
|
||||
self.conn = conn = secop.client.SecopClient(uri)
|
||||
conn.validate_data = True
|
||||
self.log = conn.log
|
||||
@ -83,10 +83,7 @@ class QSECNode(QObject):
|
||||
return self.conn.getParameter(module, parameter, True)
|
||||
|
||||
def execCommand(self, module, command, argument):
|
||||
try:
|
||||
return self.conn.execCommand(module, command, argument)
|
||||
except Exception as e:
|
||||
return 'ERROR: %r' % e, {}
|
||||
return self.conn.execCommand(module, command, argument)
|
||||
|
||||
def queryCache(self, module):
|
||||
return {k: Value(*self.conn.cache[(module, k)])
|
||||
@ -115,7 +112,7 @@ class QSECNode(QObject):
|
||||
|
||||
class MainWindow(QMainWindow):
|
||||
def __init__(self, hosts, parent=None):
|
||||
super(MainWindow, self).__init__(parent)
|
||||
super().__init__(parent)
|
||||
|
||||
loadUi(self, 'mainwindow.ui')
|
||||
|
||||
|
Reference in New Issue
Block a user