diff --git a/oml/utils.py b/oml/utils.py index 6e8f84a..4478222 100644 --- a/oml/utils.py +++ b/oml/utils.py @@ -239,7 +239,7 @@ def get_local_ipv4(): ips = [l for l in stdout.split('\n') if 'inet ' in l] if ips: ip = ips[0].strip().split(' ')[1] - else: + elif sys.platform.startswith('linux'): cmd = ['ip', 'route', 'show'] p = subprocess.Popen(cmd, stdout=subprocess.PIPE, close_fds=True) stdout, stderr = p.communicate()