use dialog result instead of global RESULT

This commit is contained in:
iLLiCiTiT 2021-04-29 18:39:22 +02:00
parent 5cc3977aea
commit 1aa91da358

View file

@ -10,15 +10,6 @@ from .bootstrap_repos import BootstrapRepos
from .version import __version__ as version
RESULT = 0
def get_result(res: int):
"""Sets result returned from dialog."""
global RESULT
RESULT = res
def open_dialog():
"""Show Igniter dialog."""
from Qt import QtWidgets, QtCore
@ -31,12 +22,10 @@ def open_dialog():
app = QtWidgets.QApplication(sys.argv)
d = InstallDialog()
d.finished.connect(get_result)
d.open()
app.exec()
return RESULT
app.exec_()
return d.result()
__all__ = [