From 04cdb8f5b5b2102ff3ed4b971a8ea3d2edb6d408 Mon Sep 17 00:00:00 2001 From: j Date: Sun, 25 May 2014 14:40:57 +0200 Subject: [PATCH] fix get_local_ipv4 on 12.04 --- oml/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oml/utils.py b/oml/utils.py index 5e0cfa0..0702c55 100644 --- a/oml/utils.py +++ b/oml/utils.py @@ -168,7 +168,7 @@ def get_local_ipv4(): if local: dev = local[0].split(' ')[4] local_ip = [l for l in stdout.split('\n') - if dev in l and not 'default' in l] + if dev in l and not 'default' in l and 'src' in l] ip = [p for p in local_ip[0].split(' ')[1:] if '.' in p][0] return ip