From d22c08e97cd3d44fcbfcc9613b53ef9bcaa46ce3 Mon Sep 17 00:00:00 2001 From: j Date: Fri, 23 May 2014 22:10:02 +0200 Subject: [PATCH] dont fail without ip --- oml/utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/oml/utils.py b/oml/utils.py index 4789933..c8ea599 100644 --- a/oml/utils.py +++ b/oml/utils.py @@ -138,6 +138,7 @@ def get_interface(): return interface def get_local_ipv4(): + ip = None if sys.platform == 'darwin': cmd = ['/sbin/route', '-n', 'get', 'default'] p = subprocess.Popen(cmd, stdout=subprocess.PIPE)