autotest/virt-test — pull request #606 by FengYang (2013-07-05 10:11:56+00:00)
Title: qemu.tests.floppy: Fix issue 'NoneType' object has no attribute 'create'

When fail to get vm from env file, we will meet following issue:
Traceback (most recent call last):
File "/root/ypu/autotest_upstream_master/client/shared/test.py", line 426, in _exec
_call_test_function(self.execute, *p_args, **p_dargs)
File "/root/ypu/autotest_upstream_master/client/shared/test.py", line 853, in _call_test_function
raise error.UnhandledTestFail(e)
UnhandledTestFail: Unhandled AttributeError: 'NoneType' object has no attribute 'create' [context: Boot up guest with a floppy]
Traceback (most recent call last):
File "/root/ypu/autotest_upstream_master/client/shared/test.py", line 846, in _call_test_function
return func(*args, **dargs)
File "/root/ypu/autotest_upstream_master/client/shared/test.py", line 299, in execute
postprocess_profiled_run, args, dargs)
File "/root/ypu/autotest_upstream_master/client/shared/test.py", line 216, in _call_run_once
*args, **dargs)
File "/root/ypu/autotest_upstream_master/client/shared/test.py", line 322, in run_once_profiling
self.run_once(*args, **dargs)
File "/root/ypu/autotest_upstream_master/client/tests/virt/virt.py", line 133, in run_once
run_func(self, params, env)
File "/root/ypu/autotest_upstream_master/client/shared/error.py", line 138, in new_fn
return fn(*args, **kwargs)
File "/root/ypu/autotest_upstream_master/client/tests/virt/qemu/tests/floppy.py", line 33, in run_floppy
vm.create()
AttributeError: 'NoneType' object has no attribute 'create'

Call env_process.preprocess_vm(test, params, env, vm_name) to create vm could skip this issue.

Signed-off-by: Feng Yang