From: Jiri Pirko jiri@mellanox.com
In prepare_json_str, just return valid empty JSON string then no config is set.
Signed-off-by: Jiri Pirko jiri@mellanox.com --- lnst/Slave/NetConfigDevice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lnst/Slave/NetConfigDevice.py b/lnst/Slave/NetConfigDevice.py index 85eef7f..809c0c5 100644 --- a/lnst/Slave/NetConfigDevice.py +++ b/lnst/Slave/NetConfigDevice.py @@ -283,7 +283,7 @@ class NetConfigDeviceVlan(NetConfigDeviceGeneric):
def prepare_json_str(json_str): if not json_str: - return "" + return "{}" json_str = json_str.replace('"', '\"') json_str = re.sub('\s+', ' ', json_str) return json_str