KVM test: No need close session when login timeout

On subtest timedrift_with_migration, if login
times out, wait_for() will return 'None' and
that will be assigned to 'session', yielding
an Attribute error when calling session.close()
afterwards. So let's call session.close only if
session is not None.

Signed-off-by: Amos Kong <akong@redhat.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@4055 592f7852-d20e-0410-864c-8624ca9c26a4
1 file changed