diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-05-20 07:33:40 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-05-20 07:33:40 (GMT) |
commit | ba9ac5b5c42a9bba54942211a3b00a1c3ce7bb23 (patch) | |
tree | 84491ee8c5be973ab45551b7319bb71416946827 /Lib/uuid.py | |
parent | 492f0277933fd5714762a99ec99fd7f97d99866a (diff) | |
download | cpython-ba9ac5b5c42a9bba54942211a3b00a1c3ce7bb23.zip cpython-ba9ac5b5c42a9bba54942211a3b00a1c3ce7bb23.tar.gz cpython-ba9ac5b5c42a9bba54942211a3b00a1c3ce7bb23.tar.bz2 |
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 e627573..5c731ec 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) |