Commit 40e6fa97 authored by Nikos Skalkotos's avatar Nikos Skalkotos

Fix a bug in update_sysprep_param

The function would raise an exception if the value was not a list
parent 5a1efdbb
......@@ -386,10 +386,11 @@ def update_sysprep_param(session, name, title=None):
default_item = 1
while 1:
value = []
for i in param.value:
if param.is_list:
value = []
for i in param.value:
choices = [(str(i+1), str(value[i])) for i in xrange(len(value))]
if len(choices) == 0:
action = 'add'
......@@ -433,6 +434,8 @@ def update_sysprep_param(session, name, title=None):
del value[choice-1]
value[choice-1] = new_value
value = new_value
if param.set_value(value) is False:
d.msgbox("Error: %s" % param.error, width=WIDTH)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment