Remove use of construct lib FieldError exception

Version 2.8.22 of the construct lib has introduced a change that
removed the core.FieldError exception. The check now uses the
parent exception - core.ConstructError.

Change-Id: I31922c2afc2018a4f6f7ba48094388070537a13f
Closes-Bug: 1745208
This commit is contained in:
Bob Fournier 2018-01-24 14:35:09 -05:00
parent 0cf3316662
commit a6f2805bbc
1 changed files with 1 additions and 2 deletions

View File

@ -155,8 +155,7 @@ class LLDPParser(object):
# individual fields can be accessed
try:
struct = tlv_parser.parse(data)
except (core.RangeError, core.FieldError, core.MappingError,
netaddr.AddrFormatError) as e:
except (core.ConstructError, netaddr.AddrFormatError) as e:
LOG.warning("TLV parse error: %s", e,
node_info=self.node_info)
return False