Michael Felt <aixto...@felt.demon.nl> added the comment:

Historically, I started this issue because I saw that none of the calls made in 
uuid.py were working for AIX.

I also assumed that they ALL worked already, at least somewhere.

a) one cause is the difference between AIX and (all) others was the letter 
chosen to separate the six fields that from the hexadecimal macaddr. (AIX uses 
'.', others use ':').

b) on AIX only netstat -ia returns a macaddr - so the GETTERS array of routines 
to call could be shorter

c) as the tests accept (I'll call it) no response aka None this was "passing" 
for all calls on AIX, including the mock test which had ":" hard coded into the 
test procedure and the mock data.

d) the current test has to fail (i.e., always return None) when the output is 
coming from netstat because the output layout is fundamentally different. With 
netstat the keyword is in the first-line only and it determines the position, 
or index, of a potential value in the following lines. Other commands, such as 
ifconfig on linux, have the keyword and value on the same line with the keyword 
(position:index) proceeding the value (position:index+1)

All this time I thought this was ONLY and AIX issue but in examining other 
platforms I see that some (e.g., Linux) do not have a macaddr value in netstat 
output - while others do (e.g., macos).

In short, I would appreciate the current PR being merged so that AIX has at 
least basic support. However, I am ready to continue, as a new PR, re-working 
the tests (so that a response of None is at least a warning) when a macaddr is 
not found for a platform - rather than over customization of test_uuid.py (as I 
have started to do here for AIX).

For platforms that do return a macaddr using netstat I would like to hear if 
that platform uses the "inline" method such as the command 'ifconfig' does on 
Linux, or if it is the "header" method such as on AIX and macos.

Thank you for your consideration.

----------

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

Reply via email to