From 2b543b0a5a81e9a100e5bb148324a3ca9aa5aeea Mon Sep 17 00:00:00 2001 From: Tomas Korbar Date: Mon, 10 Dec 2018 15:33:38 +0100 Subject: [PATCH] Fix unit configuration reading Append "1" to Unit configuration check for enabled and replace values Resolves: rhbz#1613379 --- tuned/profiles/unit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tuned/profiles/unit.py b/tuned/profiles/unit.py index 3052a81..f944d1d 100644 --- a/tuned/profiles/unit.py +++ b/tuned/profiles/unit.py @@ -11,8 +11,8 @@ class Unit(object): def __init__(self, name, config): self._name = name self._type = config.pop("type", self._name) - self._enabled = config.pop("enabled", True) in [True, "true", 1] - self._replace = config.pop("replace", False) in [True, "true", 1] + self._enabled = config.pop("enabled", True) in [True, "true", 1, "1"] + self._replace = config.pop("replace", False) in [True, "true", 1, "1"] self._devices = config.pop("devices", "*") self._devices_udev_regex = config.pop("devices_udev_regex", None) self._script_pre = config.pop("script_pre", None)