diff options
author | Martin Braun <martin.braun@ettus.com> | 2018-03-01 11:50:46 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2018-03-02 13:48:14 -0800 |
commit | 0cb30c8412385982e5af856e7dc90609c0ad9760 (patch) | |
tree | 43c1302bfa33c37f0747d80588ea335ede76d701 /mpm/python | |
parent | c3cc98cc7623bd7f11dde513011435a919bda6fe (diff) | |
download | uhd-0cb30c8412385982e5af856e7dc90609c0ad9760.tar.gz uhd-0cb30c8412385982e5af856e7dc90609c0ad9760.tar.bz2 uhd-0cb30c8412385982e5af856e7dc90609c0ad9760.zip |
mpm: net: Add get_hostname()
Diffstat (limited to 'mpm/python')
-rw-r--r-- | mpm/python/usrp_mpm/sys_utils/net.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mpm/python/usrp_mpm/sys_utils/net.py b/mpm/python/usrp_mpm/sys_utils/net.py index 1b6ddd2c1..61b9f2c91 100644 --- a/mpm/python/usrp_mpm/sys_utils/net.py +++ b/mpm/python/usrp_mpm/sys_utils/net.py @@ -12,6 +12,9 @@ from six import iteritems from pyroute2 import IPRoute, IPDB from usrp_mpm.mpmlog import get_logger +def get_hostname(): + """Return the current device's hostname""" + return socket.gethostname() def get_valid_interfaces(iface_list): """ |