public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
[parent not found: <1693251447.2192221261839864189.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com>]
* [Autotest PATCH] KVM test: No need close session when login timeout
@ 2009-12-25  7:32 Amos Kong
  0 siblings, 0 replies; 5+ messages in thread
From: Amos Kong @ 2009-12-25  7:32 UTC (permalink / raw)
  To: autotest; +Cc: kvm

If login timeout, wait_for() returned 'None' and assigned to 'session'.
When call session.close(), this prlblem was caused:
"AttributeError: 'NoneType' object has no attribute 'close'"

Signed-off-by: Amos Kong <akong@redhat.com>
---
 client/tests/kvm/tests/timedrift_with_migration.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/client/tests/kvm/tests/timedrift_with_migration.py b/client/tests/kvm/tests/timedrift_with_migration.py
index a012db3..0b93183 100644
--- a/client/tests/kvm/tests/timedrift_with_migration.py
+++ b/client/tests/kvm/tests/timedrift_with_migration.py
@@ -76,7 +76,8 @@ def run_timedrift_with_migration(test, params, env):
                                              time_filter_re, time_format)
 
     finally:
-        session.close()
+        if session != None:
+            session.close()
 
     # Report results
     host_delta = ht1 - ht0
-- 
1.5.5.6

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-12-28  2:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <843369727.2189451261747394285.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com>
2009-12-25 13:28 ` [Autotest PATCH] KVM test: No need close session when login timeout Michael Goldish
2009-12-26  3:56   ` Amos Kong
     [not found] <1693251447.2192221261839864189.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com>
2009-12-26 15:07 ` Michael Goldish
2009-12-28  2:54   ` Amos Kong
2009-12-25  7:32 Amos Kong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox