From bb5a171ffc6a4c6b8d33c2f1cf7f56ab89fccca5 Mon Sep 17 00:00:00 2001 From: Nadiia Stetskovych Date: Tue, 5 Feb 2019 08:43:08 +0200 Subject: [PATCH] [minigraph]: Do not fail for minigraphs which do not have neighbors listed in section (#2522) 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 16b7263ecd..44b5a340fa 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 %}