Skip to content

Commit 9cc4f8e

Browse files
authored
Fix exception handling for file errors (#2565)
1 parent 60c78c2 commit 9cc4f8e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

keras_hub/src/utils/preset_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ def tf_copy_gfile_to_cache(preset, path):
285285
# Work around this bug.
286286
os.remove(local_path)
287287
if isinstance(
288-
e, tf.errors.PermissionDeniedError, tf.errors.NotFoundError
288+
e, (tf.errors.PermissionDeniedError, tf.errors.NotFoundError)
289289
):
290290
raise FileNotFoundError(
291291
f"`{path}` doesn't exist in preset directory `{preset}`.",

0 commit comments

Comments
 (0)