Skip to contentSkip to conversation

auto-t: remove waitstatus_to_exitcode for better compatibility

PATCH New James Prestwood 1 participant 1 message Mar 18, 2022

lore
Share & tools
lore

James Prestwood

author
#0 lore raw

PATCH 1/1 auto-t: remove waitstatus_to_exitcode for better compatibility

This was added in Python 3.9 which isn't always supported. Instead use the old way of checking the return status.

---
 autotests/testNetconfig/connection_test.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
autotests/testNetconfig/connection_test.py +2 -1
index 8eeffbbd..17788011 100644
@@ -41,7 +41,8 @@ class Test(unittest.TestCase):
 
         time.sleep(2)
         ret = os.system('ip addr show ' + device.name + ' | grep \'inet6 3ffe:501:ffff:100::\'')
-        self.assertEqual(os.waitstatus_to_exitcode(ret), 0)
+        self.assertTrue(os.WIFEXITED(ret))
+        self.assertEqual(os.WEXITSTATUS(ret), 0)
 
         device.disconnect()
 
Signature · 1 line
2.34.1