ldoktor/autotest — comment on commit 6706ecda9abce2c9d9f3c811f6f35ebd008dce3a
File: client/virt/kvm_vm.py line 653
By lmr:

What about something like:

image_snapshot = None
if image_params.get('image_snapshot') == 'yes':
image_snapshot = True
elif image_params.get('image_snapshot') == 'no':
image_snapshot = False

image_boot = None
if image_params.get('image_boot') == 'yes':
image_boot = True
elif image_params.get('image_boot') == 'no':
image_boot = False

qemu_cmd += add_drive(help,
virt_vm.get_image_filename(image_params, root_dir),
image_params.get("drive_index"),
image_params.get("drive_format"),
image_params.get("drive_cache"),
image_params.get("drive_werror"),
image_params.get("drive_rerror"),
image_params.get("drive_serial"),
image_snapshot,
image_boot,
virt_vm.get_image_blkdebug_filename(image_params,
self.virt_dir),
bus,
port,
image_params.get("bootindex"),
image_params.get("removable"),
image_params.get("min_io_size"),
image_params.get("opt_io_size"),
image_params.get("physical_block_size"),
image_params.get("logical_block_size"))

It's simple and straightforward, and does the same as the py 2.6 construct...