1
0
Fork 0

Merge pull request #142 from TomasKorbar/rhbz1613379

Fix unit configuration reading
This commit is contained in:
Jaroslav Škarvada 2019-01-31 16:15:21 +01:00 committed by GitHub
commit f79c6292b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)