From: Berker Peksag Date: Sun, 20 Mar 2016 14:49:10 +0000 (+0200) Subject: Issue #19164: Improve exception message of uuid.UUID() X-Git-Tag: v3.6.0a1~427^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d02eb8a713db8708a7981fe1ba801efaf606a359;p=thirdparty%2FPython%2Fcpython.git Issue #19164: Improve exception message of uuid.UUID() Patch by jgauthier. --- diff --git a/Lib/uuid.py b/Lib/uuid.py index 5b24e2c29ece..e96e7e034cc5 100644 --- a/Lib/uuid.py +++ b/Lib/uuid.py @@ -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('-', '')