Merge pull request #228 from yarda/base-plugin-options-parser-fix
unit: accept "True" for replace and enabled options
This commit is contained in:
commit
b5fbf47ff5
1 changed files with 2 additions and 2 deletions
|
|
@ -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, "1"]
|
||||
self._replace = config.pop("replace", False) in [True, "true", 1, "1"]
|
||||
self._enabled = config.pop("enabled", True) in [True, "True", "true", 1, "1"]
|
||||
self._replace = config.pop("replace", False) in [True, "True", "true", 1, "1"]
|
||||
self._devices = config.pop("devices", "*")
|
||||
self._devices_udev_regex = config.pop("devices_udev_regex", None)
|
||||
self._cpuinfo_regex = config.pop("cpuinfo_regex", None)
|
||||
|
|
|
|||
Loading…
Reference in a new issue