fix get_local_ipv4 on 12.04
This commit is contained in:
parent
98d1725d19
commit
04cdb8f5b5
1 changed files with 1 additions and 1 deletions
|
@ -168,7 +168,7 @@ def get_local_ipv4():
|
||||||
if local:
|
if local:
|
||||||
dev = local[0].split(' ')[4]
|
dev = local[0].split(' ')[4]
|
||||||
local_ip = [l for l in stdout.split('\n')
|
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]
|
ip = [p for p in local_ip[0].split(' ')[1:] if '.' in p][0]
|
||||||
return ip
|
return ip
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue