Xavier de Gaye <[email protected]> added the comment:
test_uuid fails now on android-24-armv7 on the master branch:
======================================================================
FAIL: test_getnode (test.test_uuid.TestUUIDWithoutExtModule)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/sdcard/org.python/lib/python3.7/test/test_uuid.py", line 312, in
test_getnode
self.assertEqual(node1, node2, '%012x != %012x' % (node1, node2))
AssertionError: 237015144408656 != 105397654869517 : d790637d2650 !=
5fdbcdc7560d
Some context:
* There is no _uuid extension module.
* All the getters in uuid.getnode() fail: _ip_getnode() fails because the 'ip
link list' command fails on Android while 'ip link' would have succeeded (and
would have hidden the above bug), 'ifconfig' does not print MAC addresses and
the commands of the other getters do not exist.
The following patch fixes the problem:
diff --git a/Lib/uuid.py b/Lib/uuid.py
index cb2bc092bd..be06a6eff3 100644
--- a/Lib/uuid.py
+++ b/Lib/uuid.py
@@ -674,14 +674,14 @@ def getnode():
getters = [_unix_getnode, _ifconfig_getnode, _ip_getnode,
_arp_getnode, _lanscan_getnode, _netstat_getnode]
- for getter in getters:
+ for getter in getters + [_random_getnode]:
try:
_node = getter()
except:
continue
if _node is not None:
return _node
- return _random_getnode()
+ assert False, '_random_getnode() returned None'
----------
nosy: +xdegaye
resolution: fixed ->
stage: resolved -> needs patch
status: closed -> open
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue32107>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com