From: Markus Theil Date: Wed, 8 Jan 2020 23:03:02 +0000 (+0100) Subject: tests: Fix Python sleep function X-Git-Tag: hostap_2_10~1959 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a42316374f275f0e782b8072907f83a36a8a19d;p=thirdparty%2Fhostap.git tests: Fix Python sleep function 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 --- 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")