From f93b8da1b71b473512faa7ba895ebe9e536db770 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 15 Oct 2021 16:49:45 -0400 Subject: [PATCH] Handle invalid vendor-class-identifier better If the vci fails to decode, just ignore it and move on. --- confluent_server/confluent/discovery/protocols/pxe.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/confluent_server/confluent/discovery/protocols/pxe.py b/confluent_server/confluent/discovery/protocols/pxe.py index a86fa0f5..d354902a 100644 --- a/confluent_server/confluent/discovery/protocols/pxe.py +++ b/confluent_server/confluent/discovery/protocols/pxe.py @@ -233,7 +233,10 @@ def opts_to_dict(rq, optidx, expectype=1): maybeztp = False if 239 in reqdict.get(55, []): maybeztp = True - vci = stringify(reqdict.get(60, b'')) + try: + vci = stringify(reqdict.get(60, b'')) + except UnicodeDecodeError: + vci = '' if vci.startswith('cumulus-linux'): disco['arch'] = vci.replace('cumulus-linux', '').strip() iscumulus = True