From 0c6fe9164f30d442f157a93f7cef41c8eeca7c32 Mon Sep 17 00:00:00 2001 From: lfield Date: Fri, 5 Oct 2018 16:05:59 +0200 Subject: [PATCH] Catching exception --- py/Boinc/setup_project.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/py/Boinc/setup_project.py b/py/Boinc/setup_project.py index 140ef3cdc3..f226790049 100644 --- a/py/Boinc/setup_project.py +++ b/py/Boinc/setup_project.py @@ -340,7 +340,10 @@ def install_boinc_files(dest_dir, install_web_files, install_server_files): shutil.copy(srcdir('html/user/sample_motd.php'), dir('html/user/motd.php')) os.system("rm -f "+dir('html/languages/translations/*')) install_glob(srcdir('html/languages/translations/*.po'), dir('html/languages/translations/')) - os.remove(srcdir('html/inc/release.inc')) + try: + os.remove(srcdir('html/inc/release.inc')) + except OSError: + pass try: s = subprocess.Popen(["git", "rev-parse", "HEAD"], stdout=subprocess.PIPE, stderr=open(os.devnull, 'w')) commit = s.stdout.read()[:7]