diff options
author | Brett Cannon <bcannon@gmail.com> | 2006-09-26 23:38:24 (GMT) |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2006-09-26 23:38:24 (GMT) |
commit | 11b3535280acccca9a242d3275532cda45eb5ba4 (patch) | |
tree | 5248c0caef09bb50b6ebd04586095a5d3c23bc2e /Lib | |
parent | c839c2f2262cc95e1831ad514f52abd8128367da (diff) | |
download | cpython-11b3535280acccca9a242d3275532cda45eb5ba4.zip cpython-11b3535280acccca9a242d3275532cda45eb5ba4.tar.gz cpython-11b3535280acccca9a242d3275532cda45eb5ba4.tar.bz2 |
Make the error message for when the time data and format do not match clearer.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/_strptime.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/_strptime.py b/Lib/_strptime.py index ce8525b..3fb5602 100644 --- a/Lib/_strptime.py +++ b/Lib/_strptime.py @@ -306,7 +306,7 @@ def strptime(data_string, format="%a %b %d %H:%M:%S %Y"): _cache_lock.release() found = format_regex.match(data_string) if not found: - raise ValueError("time data did not match format: data=%s fmt=%s" % + raise ValueError("time data %r does not match format %r" % (data_string, format)) if len(data_string) != found.end(): raise ValueError("unconverted data remains: %s" % |