The message for the exception when time.strptime was passed something other
than str did not output the type of the argument but the object itself.
This commit is contained in:
parent
14f3ae2723
commit
71095ea4ce
|
@ -298,7 +298,7 @@ def _strptime(data_string, format="%a %b %d %H:%M:%S %Y"):
|
|||
for index, arg in enumerate([data_string, format]):
|
||||
if not isinstance(arg, str):
|
||||
msg = "strptime() argument {} must be str, not {}"
|
||||
raise TypeError(msg.format(arg, index))
|
||||
raise TypeError(msg.format(index, type(arg)))
|
||||
|
||||
global _TimeRE_cache, _regex_cache
|
||||
with _cache_lock:
|
||||
|
|
Loading…
Reference in New Issue