diff options
author | Devaev Maxim <[email protected]> | 2020-09-30 07:49:58 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2020-09-30 07:49:58 +0300 |
commit | 1b62570466804a2fe0a21bbdccd7a289c8974496 (patch) | |
tree | 2c9b820746ef24fc2552e909e17a3822466c9ad4 /kvmd/apps/__init__.py | |
parent | 630593492abe6f7d6edf15ee05e62e7d0489e36d (diff) |
optional host_mac and kvm_mac
Diffstat (limited to 'kvmd/apps/__init__.py')
-rw-r--r-- | kvmd/apps/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kvmd/apps/__init__.py b/kvmd/apps/__init__.py index 2473fa72..149782c4 100644 --- a/kvmd/apps/__init__.py +++ b/kvmd/apps/__init__.py @@ -404,8 +404,8 @@ def _get_config_scheme() -> Dict: "ethernet": { "enabled": Option(False, type=valid_bool), - "host_mac": Option("", type=valid_mac, only_if="enabled"), - "kvm_mac": Option("", type=valid_mac, only_if="enabled"), + "host_mac": Option("", type=(lambda arg: (valid_mac(arg) if arg else ""))), + "kvm_mac": Option("", type=(lambda arg: (valid_mac(arg) if arg else ""))), }, "drives": { |