diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-11-24 18:17:11 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-11-24 18:17:11 +0200 |
commit | 88d9687354940dd48a98bf7ad40c5e140fdec242 (patch) | |
tree | 2bf287666a8fad7971da761f3777686cc49bdb01 /Lib/_strptime.py | |
parent | 901b549ff19913b7dd66e515d946bdf2bf991a1b (diff) | |
parent | 1c7bf9dd0c125a043d612558b39b26908d5dc0cd (diff) | |
download | cpython-88d9687354940dd48a98bf7ad40c5e140fdec242.tar.gz |
Issue #19545: Avoid chained exceptions while passing stray % to
time.strptime(). Initial patch by Claudiu Popa.
Diffstat (limited to 'Lib/_strptime.py')
-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 9058a69861..d101c6de05 100644 --- a/Lib/_strptime.py +++ b/Lib/_strptime.py @@ -21,7 +21,7 @@ from datetime import (date as datetime_date, timezone as datetime_timezone) try: from _thread import allocate_lock as _thread_allocate_lock -except: +except ImportError: from _dummy_thread import allocate_lock as _thread_allocate_lock __all__ = [] |