Skip to content

Commit 122e61c

Browse files
committed
Improve robustness in load_module by specifying Exception type
1 parent 965e17d commit 122e61c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tensorflow_quantum/core/ops/load_module.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def _load(self):
4747
try:
4848
path = resource_loader.get_path_to_datafile(self._name)
4949
self._module = load_library.load_op_library(path)
50-
except:
50+
except Exception: # pylint: disable=broad-except
5151
path = os.path.join(get_python_lib(),
5252
"tensorflow_quantum/core/ops", self._name)
5353
self._module = load_library.load_op_library(path)

0 commit comments

Comments
 (0)