diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-05-20 10:33:40 +0300 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-05-20 10:33:40 +0300 |
commit | ba9ac5b5c42a9bba54942211a3b00a1c3ce7bb23 (patch) | |
tree | 84491ee8c5be973ab45551b7319bb71416946827 /Lib/uuid.py | |
parent | Issue #22107: tempfile.gettempdir() and tempfile.mkdtemp() now try again (diff) | |
download | cpython-ba9ac5b5c42a9bba54942211a3b00a1c3ce7bb23.tar.gz cpython-ba9ac5b5c42a9bba54942211a3b00a1c3ce7bb23.tar.bz2 cpython-ba9ac5b5c42a9bba54942211a3b00a1c3ce7bb23.zip |
Issue #16261: Converted some bare except statements to except statements
with specified exception type. Original patch by Ramchandra Apte.
Diffstat (limited to 'Lib/uuid.py')
-rw-r--r-- | Lib/uuid.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/uuid.py b/Lib/uuid.py index e627573969c..5c731ec0033 100644 --- a/Lib/uuid.py +++ b/Lib/uuid.py @@ -465,7 +465,7 @@ try: for libname in ['uuid', 'c']: try: lib = ctypes.CDLL(ctypes.util.find_library(libname)) - except: + except Exception: continue if hasattr(lib, 'uuid_generate_random'): _uuid_generate_random = lib.uuid_generate_random @@ -607,7 +607,7 @@ def uuid4(): try: import os return UUID(bytes=os.urandom(16), version=4) - except: + except Exception: import random return UUID(int=random.getrandbits(128), version=4) |