Xavier de Gaye <xdeg...@gmail.com> added the comment:

Whatever the change made to fix this issue, it is not possible to add a test 
case for this change.

So following the suggestion made by Barry in PR 4696, we can add (in another 
issue) a new keyword parameter to getnode() named 'methods' whose value may be 
None (the default, meaning try all the known methods) or a tuple containing a 
subset of the following methods ('unix', 'ifconfig', 'ip', 'arp', 'lanscan', 
'netstat',  'random') that would raise an exception if the value cannot be 
obtained using one of the requested method tried in the requested order. This 
would also improve the documentation on the methods getnode() is using. Then if 
we decide to make the change for 'ip link' in the current issue, one can add a 
test case that would first test for the avaibility of the ip command and if the 
command exists would fail if getnode(methods=('ip',)) raises an exception.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32199>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to