From bafc194c58c426e018a76e25656dbdb760b2db4f Mon Sep 17 00:00:00 2001 From: zmoody Date: Fri, 3 Aug 2018 16:11:17 -0500 Subject: [PATCH] Fixes #83 - Slashes in IP Description causes Exception Adds ValueErrors to the list of exceptions that pass through the netaddr process due to netaddr returning a ValueError instead of a AddrFormatError when given certain input. --- pynetbox/lib/response.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pynetbox/lib/response.py b/pynetbox/lib/response.py index 19ffa350..275d151d 100644 --- a/pynetbox/lib/response.py +++ b/pynetbox/lib/response.py @@ -332,7 +332,7 @@ def _parse_values(self, values): if isinstance(v, six.string_types): try: v = netaddr.IPNetwork(v) - except netaddr.AddrFormatError: + except (netaddr.AddrFormatError, ValueError): pass self._add_cache((k, v)) else: