File bugfix-any-unicode-string-of-length-16-will-raise-ty.patch of Package salt.9310

From 89ed121f5b5c4c375a19c0131f08704bb40bf9ec Mon Sep 17 00:00:00 2001
From: Bo Maryniuk <bo@suse.de>
Date: Fri, 5 Oct 2018 12:02:08 +0200
Subject: [PATCH] Bugfix: any unicode string of length 16 will raise
 TypeError instead of ValueError

---
 salt/_compat.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/salt/_compat.py b/salt/_compat.py
index 0576210afc..71963a4ead 100644
--- a/salt/_compat.py
+++ b/salt/_compat.py
@@ -192,7 +192,7 @@ class IPv6AddressScoped(ipaddress.IPv6Address):
         if len(data) == 16 and ':' not in data:
             try:
                 packed = bool(int(str(bytearray(data)).encode('hex'), 16))
-            except ValueError:
+            except (ValueError, TypeError):
                 pass
 
         return packed
-- 
2.17.1


openSUSE Build Service is sponsored by