[AppImage package] fix: not able to reinitialize

This commit is contained in:
Vinicius Moreira
2021-12-22 17:49:26 -03:00
parent 80756c23af
commit 68ce25b287
2 changed files with 9 additions and 5 deletions

View File

@@ -36,11 +36,10 @@ def get_default_icon(system: bool = True) -> Tuple[str, QIcon]:
def restart_app():
"""
:param show_panel: if the panel should be displayed after the app restart
:return:
"""
restart_cmd = [sys.executable, *sys.argv]
appimage_path = os.getenv('APPIMAGE')
restart_cmd = [appimage_path] if appimage_path else [sys.executable, *sys.argv]
subprocess.Popen(restart_cmd)
QCoreApplication.exit()