From 647f4af000203bc624b94e8362867dd6fd96b7e2 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Thu, 23 Mar 2017 16:57:28 -0700 Subject: [PATCH] Always define link_type in debian interfaces The existing code continues when an unknown link_type is found, unfortunately we don't set link_type when the link_type is not known so we get a python error. Just set link_type to None when we can't determine what it is to allow the continue to function as intended. Change-Id: Ib41650e92f24050efbc9358a6adc68421ae8a8e4 --- glean/cmd.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/glean/cmd.py b/glean/cmd.py index 2039387..17d80b5 100644 --- a/glean/cmd.py +++ b/glean/cmd.py @@ -602,6 +602,8 @@ def write_debian_interfaces(interfaces, sys_interfaces): link_type = "inet6" elif interface['type'] == 'ipv4': link_type = "inet" + else: + link_type = None # We do not know this type of entry if not link_type: