From 9f86f12f1a3c4a4b12f7150cc5a0d3d4b8377bd0 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Thu, 16 Jul 2020 02:36:26 -0400 Subject: [PATCH] Only parse script_run_args if not None --- api-daemon/pvcapid/provisioner.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/api-daemon/pvcapid/provisioner.py b/api-daemon/pvcapid/provisioner.py index 5ed4a3c9..7a815d05 100755 --- a/api-daemon/pvcapid/provisioner.py +++ b/api-daemon/pvcapid/provisioner.py @@ -1543,9 +1543,10 @@ def create_vm(self, vm_name, vm_profile, define_vm=True, start_vm=True, script_r script_arguments[argument_name] = argument_data # Parse the runtime arguments - for argument in script_run_args: - argument_name, argument_data = argument.split('=') - script_arguments[argument_name] = argument_data + if script_run_args is not None: + for argument in script_run_args: + argument_name, argument_data = argument.split('=') + script_arguments[argument_name] = argument_data print("Script arguments: {}".format(script_arguments))