From eac55de2a293547b979787e859abc7ecf9edf64c Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Tue, 30 Aug 2022 19:38:23 +0200 Subject: [PATCH] catch errors during install --- src/install.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/install.py b/src/install.py index 785e75c..71aaee1 100644 --- a/src/install.py +++ b/src/install.py @@ -4,14 +4,19 @@ import sys import textwrap from pathlib import Path +log = logging.getLogger("install") + def install(): - if sys.platform == 'win32' or sys.platform == 'cygwin': - _windows_set_icon() - else: - if _is_executable(): - _linux_install_desktop_file() - _linux_install_icon() + try: + if sys.platform == 'win32' or sys.platform == 'cygwin': + _windows_set_icon() + else: + if _is_executable(): + _linux_install_desktop_file() + _linux_install_icon() + except: + log.exception("failed to install system stuff") def _is_executable() -> bool: