1
0
mirror of https://github.com/dkmstr/openuds.git synced 2024-12-21 09:34:08 +03:00

fixed to work correctly on free

This commit is contained in:
Adolfo Gómez García 2016-04-29 11:15:07 +02:00
parent 813764a100
commit bd70a6290e

View File

@ -57,7 +57,7 @@ def _getMacAddr(ifname):
try:
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
info = bytearray(fcntl.ioctl(s.fileno(), 0x8927, struct.pack(str('256s'), ifname[:15])))
return six.text_type(''.join(['%02x:' % char for char in info[18:24]])[:-1])
return six.text_type(''.join(['%02x:' % char for char in info[18:24]])[:-1]).upper()
except Exception:
return None