From 99f64e34716380dfc61df4ae145ceaf0cf5b7ddd Mon Sep 17 00:00:00 2001 From: Oliver Kurth Date: Wed, 27 Sep 2023 11:40:41 -0700 Subject: [PATCH] fix for split failure when there is more than one equals sign in 'param' --- ova-compose/ova-compose.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ova-compose/ova-compose.py b/ova-compose/ova-compose.py index 5ad652d..98bd830 100755 --- a/ova-compose/ova-compose.py +++ b/ova-compose/ova-compose.py @@ -1062,7 +1062,7 @@ def yaml_param(loader, node): assert type(key) is str, f"param name must be a string" if '=' in key: - key, default = [t.strip() for t in key.split('=')] + key, default = [t.strip() for t in key.split('=', maxsplit=1)] default = yaml.safe_load(default) value = params.get(key, default) @@ -1096,7 +1096,7 @@ def main(): elif o in ['-m', '--manifest']: do_manifest = True elif o in ['--param']: - k,v = a.split('=') + k,v = a.split('=', maxsplit=1) params[k] = yaml.safe_load(v) elif o in ['-q']: do_quiet = True