FIx suppression du exe.old
This commit is contained in:
@@ -468,9 +468,21 @@ class App(tk.Tk):
|
|||||||
self.repo_results = []
|
self.repo_results = []
|
||||||
|
|
||||||
log.info(f"=== Demarrage Git Update Checker v{VERSION} ===")
|
log.info(f"=== Demarrage Git Update Checker v{VERSION} ===")
|
||||||
|
self._cleanup_old_exe()
|
||||||
self._build_ui()
|
self._build_ui()
|
||||||
self.after(100, self._check_self_update_then_repos)
|
self.after(100, self._check_self_update_then_repos)
|
||||||
|
|
||||||
|
def _cleanup_old_exe(self):
|
||||||
|
"""Supprime l'ancien exe .old restant d'une mise a jour precedente."""
|
||||||
|
if getattr(sys, "frozen", False):
|
||||||
|
old_path = Path(sys.executable).with_suffix(".exe.old")
|
||||||
|
if old_path.exists():
|
||||||
|
try:
|
||||||
|
old_path.unlink()
|
||||||
|
log.info(f"Nettoyage: {old_path.name} supprime")
|
||||||
|
except OSError:
|
||||||
|
log.warning(f"Nettoyage: impossible de supprimer {old_path.name}")
|
||||||
|
|
||||||
def _build_ui(self):
|
def _build_ui(self):
|
||||||
style = ttk.Style(self)
|
style = ttk.Style(self)
|
||||||
style.theme_use("clam")
|
style.theme_use("clam")
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
0.5
|
0.5.1
|
||||||
|
|||||||
Reference in New Issue
Block a user