From 76d29b623cd2265bb6a1af8667411413160242f3 Mon Sep 17 00:00:00 2001 From: "Nadiya.Stetskovych" Date: Mon, 4 Feb 2019 08:01:18 -0800 Subject: [PATCH] Do not fail for minigraphs which do not have neighbors listed in section Signed-off-by: Nadiya.Stetskovych --- files/build_templates/buffers_config.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/build_templates/buffers_config.j2 b/files/build_templates/buffers_config.j2 index 16b7263ecda..44b5a340fab 100644 --- a/files/build_templates/buffers_config.j2 +++ b/files/build_templates/buffers_config.j2 @@ -40,7 +40,7 @@ def {%- set cable_len = [] %} {%- for local_port in DEVICE_NEIGHBOR %} {%- if local_port == port_name %} - {%- if DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] %} + {%- if DEVICE_NEIGHBOR_METADATA is defined and DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] %} {%- set neighbor = DEVICE_NEIGHBOR_METADATA[DEVICE_NEIGHBOR[local_port].name] %} {%- set neighbor_role = neighbor.type %} {%- set roles1 = switch_role + '_' + neighbor_role %}