1
0
mirror of https://github.com/dkmstr/openuds.git synced 2025-01-18 06:03:54 +03:00

more fixes

This commit is contained in:
Adolfo Gómez García 2015-04-07 11:43:33 +02:00
parent ee59f45838
commit 375f574e9e

View File

@ -123,8 +123,25 @@ class UDSClient(QtGui.QMainWindow):
script = data['result'].decode('base64').decode('bz2')
self.showMinimized()
six.exec_(script, globals(), {'parent': self})
self.showMinimized()
# After running script, wait for stuff
try:
tools.waitForTasks()
except Exception:
pass
time.sleep(3)
try:
tools.unlinkFiles()
except Exception:
pass
try:
tools.execBeforeExit()
except Exception:
pass
self.closeWindow()
except Exception as e:
@ -183,23 +200,6 @@ if __name__ == "__main__":
except Exception as e:
QtGui.QMessageBox.critical(None, 'Error', six.text_type(e), QtGui.QMessageBox.Ok)
if win.withError is False:
try:
tools.waitForTasks()
except Exception:
pass
time.sleep(3)
try:
tools.unlinkFiles()
except Exception:
pass
try:
tools.execBeforeExit()
except Exception:
pass
sys.exit(exitVal)
# Build base REST