Commit d02eb8a7 authored by Berker Peksag's avatar Berker Peksag

Issue #19164: Improve exception message of uuid.UUID()

Patch by jgauthier.
parent 563c949b
......@@ -131,7 +131,8 @@ class UUID(object):
"""
if [hex, bytes, bytes_le, fields, int].count(None) != 4:
raise TypeError('need one of hex, bytes, bytes_le, fields, or int')
raise TypeError('one of the hex, bytes, bytes_le, fields, '
'or int arguments must be given')
if hex is not None:
hex = hex.replace('urn:', '').replace('uuid:', '')
hex = hex.strip('{}').replace('-', '')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment