From 381e89a3166d8db4dfac2fc660c72c562c7f62bd Mon Sep 17 00:00:00 2001 From: Sebastian Lohff Date: Mon, 16 Apr 2012 16:42:17 +0200 Subject: [PATCH] Surpressed error when no iproute2 is present --- servefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/servefile b/servefile index 502076a..d230420 100755 --- a/servefile +++ b/servefile @@ -316,7 +316,8 @@ class ServeFile(): os.environ['PATH'] += ':/sbin:/usr/sbin' proc = Popen(r"ip addr|" + \ "sed -n -e 's/.*inet6\? \([0-9.a-fA-F:]\+\)\/.*/\\1/ p'|" + \ - "grep -v '^fe80\|^127.0.0.1\|^::1'", shell=True, stdout=PIPE) + "grep -v '^fe80\|^127.0.0.1\|^::1'", \ + shell=True, stdout=PIPE, stderr=PIPE) if proc.wait() != 0: # ip failed somehow, falling back to ifconfig oldLang = os.environ.get("LC_ALL", None)