From 62e082a1c7522f32f4a6c737f893d831ede50452 Mon Sep 17 00:00:00 2001 From: Sundar Raman <cybertoast@gmail.com> Date: Wed, 15 Aug 2012 19:22:05 -0400 Subject: [PATCH] (Re #882) Handle errors in get_interfaces If there is an error in how interfaces are configured (or only one set, like IPv6), the setup command should not error out. --- setup | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setup b/setup index 60a36f8191d..8f439a57949 100755 --- a/setup +++ b/setup @@ -467,6 +467,10 @@ class LinuxNetwork(Network): interface = dict(v4 = {}, v6 = {}) for v in 'v4', 'v6': output = subprocess.Popen(command[v], stdout=subprocess.PIPE).communicate()[0] + if not output: + # v6 routing may result in + # RTNETLINK answers: Invalid argument + continue words = output.split('\n')[0].split() # A valid output starts with the queried address on the first line if words[0] == command[v][-1]: