Commit 2bebc893 by Jérome Perrin Committed by Jérome Perrin

util: cleanup

( original issue was that sys was no imported, but it's better to raise
a catchable exception than to exit program )
1 parent 3fae274a
......@@ -125,7 +125,7 @@ def ipv6FromBin(ip, suffix=''):
if suffix_len > 0:
ip += suffix.rjust(suffix_len, '0')
elif suffix_len:
sys.exit("Prefix exceeds 128 bits")
raise ValueError("Prefix exceeds 128 bits")
return socket.inet_ntop(socket.AF_INET6,
struct.pack('>QQ', int(ip[:64], 2), int(ip[64:], 2)))
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!