From 9e830d867907a25858b6e9ef7d7398319e3a69b7 Mon Sep 17 00:00:00 2001 From: Robert Latta <robert.latta@geant.org> Date: Thu, 31 Mar 2022 18:43:31 +0000 Subject: [PATCH] fixed index out of range error --- inventory_provider/routes/poller.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inventory_provider/routes/poller.py b/inventory_provider/routes/poller.py index 9dcf2726..2b968fe5 100644 --- a/inventory_provider/routes/poller.py +++ b/inventory_provider/routes/poller.py @@ -498,7 +498,8 @@ def _get_dashboard_data(ifc, possible_names): def _get_l2_customer_names(description): info = description.upper().split('#')[0].split('|')[0].split()[1:] yield info[1] - if info[0] in ['CUSTOMER', 'RE_INTERCONNECT'] and info[2]: + if info[0] in ['CUSTOMER', 'RE_INTERCONNECT'] \ + and len(info) > 2 and info[2]: yield info[2] def _get_customer_name(description): -- GitLab