From daa01693bed2f47e6195012569f1942793eec4e0 Mon Sep 17 00:00:00 2001 From: Thomas Renninger Date: Tue, 14 Apr 2020 14:43:19 +0200 Subject: [PATCH] Avoid error when reading file '/etc/system-release-cpe' on first run Not all distros do have /etc/system-release-cpe --- tuned/utils/profile_recommender.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tuned/utils/profile_recommender.py b/tuned/utils/profile_recommender.py index 23d3d47..b885850 100644 --- a/tuned/utils/profile_recommender.py +++ b/tuned/utils/profile_recommender.py @@ -80,7 +80,8 @@ class ProfileRecommender: elif option == "system": if not re.match(value, self._commands.read_file( - consts.SYSTEM_RELEASE_FILE), re.S): + consts.SYSTEM_RELEASE_FILE, + no_error = True), re.S): match = False elif option[0] == "/": if not os.path.exists(option) or not re.match(value,