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

Patch by jgauthier.
This commit is contained in:
Berker Peksag 2016-03-20 16:49:29 +02:00
commit c0e7a9c72b
1 changed files with 2 additions and 1 deletions

View File

@ -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('-', '')