diff options
author | Naveen Joy <najoy@cisco.com> | 2019-03-27 14:28:50 -0700 |
---|---|---|
committer | Paul Vinciguerra <pvinci@vinciconsulting.com> | 2019-03-27 23:53:49 +0000 |
commit | 64f7530fff5d8811894c75fc3378a5c6da77d7b8 (patch) | |
tree | 28fdf961797a5abe3c3935ffdd6a45e24e243471 /test | |
parent | 3b12aa97ca98a802623c70bf36af4d480944a725 (diff) |
make-test: fix ValueError raised by hook in python3
Without this patch, the hook module raises a ValueError
when tests are run using python3. This patch updates the
exception being caught by ipaddress to ValueError.
Change-Id: I5e11e292a05ddf350fc04ebaf19cfd7dad2bd9d0
Signed-off-by: Naveen Joy <najoy@cisco.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/hook.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/hook.py b/test/hook.py index 555fc2ea32a..ccc5c86b9c3 100644 --- a/test/hook.py +++ b/test/hook.py @@ -39,7 +39,7 @@ class Hook(object): # we don't call test_type(val) because it is a packed value. return '{!s} ({!s})'.format(val, str( ipaddress.ip_address(val))) - except ipaddress.AddressValueError: + except ValueError: return val _args = ', '.join("{!s}={!r}".format(key, _friendly_format(val)) for |