
ERROR - None The error is coming from line no 80 and not from the control stmt added. Let me check this.
So I define a new variable of cs_exp_desc to cover this and call try_assco twice.
This is because exp_desc is defined outside of main(). main() doesn't own the exp_desc variable, so it's unable to modify it.
Instead of defining exp_desc and exp_rc at the top of the file, define both in main().
Or, you can do something like the following:
cs_exp_desc = exp_desc
curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) if curr_cim_rev >= libvirt_ec_changes: cs_exp_desc = "Referenced domain `wrong' does not exist:" + \ " Domain not found"
try_assoc(instance_cs, cs, exp_rc, cs_exp_desc, options)
Whichever is fine.
I submit a patch like the second option before, and deepti suggested that it's not a good idea to call the try_assoc() twice. I will submit a new patch with define the exp_rc and exp_desc inside of main().
Thanks!
With either option, you only call try_assoc() once. But the first option is fine. =) -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com