Skip to content
This repository was archived by the owner on Oct 18, 2023. It is now read-only.

Commit f759420

Browse files
committed
A small patch for auto-restart-after-update
1 parent 9fe546a commit f759420

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,10 @@ def Button_passwd_Clicked():
193193
NewRelease_Installation.communicate(input=sudo_passwd_bytes)
194194
subprocess.run("rm -rf %s" %deb_file,shell=True)
195195
subprocess.run("rm -rf %s" %update_pyfile,shell=True)
196-
Update_done_msg_box = QMessageBox()
197-
Update_done_msg_box.setText("Update Done\nApp will restart to apply the new version")
198-
Update_done_msg_box.exec()
199196
if NewRelease_Installation.returncode == 0 :
197+
Update_done_msg_box = QMessageBox()
198+
Update_done_msg_box.setText("Update Done\nApp will restart to apply the new version")
199+
Update_done_msg_box.exec()
200200
os.execl(sys.executable,sys.executable,*sys.argv)
201201
else :
202202
Update_err_msg_box = QMessageBox()

0 commit comments

Comments
 (0)