dont fail without ip

This commit is contained in:
j 2014-05-23 22:10:02 +02:00
parent 6169c36b62
commit d22c08e97c

View file

@ -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)