[PATCH] tests: fix Python sleep function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Current Python versions have no os.sleep(), use time.sleep() instead.

module 'os' has no attribute 'sleep'
Traceback (most recent call last):
  File "./run-tests.py", line 521, in main
    t(dev, apdev)
  File "/home/mtheil/hostap/tests/hwsim/test_pmksa_cache.py", line 356, in test_pmksa_cache_expiration
    hapd.wait_ptkinitdone(dev[0].own_addr())
  File "/home/mtheil/hostap/tests/hwsim/hostapd.py", line 282, in wait_ptkinitdone
    os.sleep(0.1)

Signed-off-by: Markus Theil <markus.theil@xxxxxxxxxxxxx>
---
 tests/hwsim/hostapd.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/hwsim/hostapd.py b/tests/hwsim/hostapd.py
index b4ebbdbf6..67e8a7fb8 100644
--- a/tests/hwsim/hostapd.py
+++ b/tests/hwsim/hostapd.py
@@ -279,7 +279,7 @@ class Hostapd:
             state = sta['hostapdWPAPTKState']
             if state == "11":
                 return
-            os.sleep(0.1)
+            time.sleep(0.1)
             timeout -= 0.1
         raise Exception("Timeout while waiting for PTKINITDONE")
 
-- 
2.24.1


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux