klattimer / LGWebOSRemote

Command line webOS remote for LGTVs
MIT License
511 stars 99 forks source link

Use platform-independent Python module to get a MAC address #85

Closed jaklan closed 3 years ago

jaklan commented 3 years ago

As in the title - there's no need to depend on iproute2, which is not available on systems like macOS (and iproute2mac doesn't support ip n s [IP] command). There's a Python library: https://github.com/GhostofGoes/getmac which solves the issue in 2 lines:

from getmac import get_mac_address

get_mac_address(ip=self.__ip)