From 411f70eb0ef6f7f26e91c3de3d8e24d5b0e618e7 Mon Sep 17 00:00:00 2001 From: Rahul Huilgol Date: Thu, 20 Feb 2020 23:05:26 +0000 Subject: [PATCH] remove the try except block around hasAtomicMove --- tensorflow/python/lib/io/file_io.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tensorflow/python/lib/io/file_io.py b/tensorflow/python/lib/io/file_io.py index fa303b18c23..c50b702a5be 100644 --- a/tensorflow/python/lib/io/file_io.py +++ b/tensorflow/python/lib/io/file_io.py @@ -603,11 +603,7 @@ def has_atomic_move(path): we need to be careful about using moves. In some cases it is safer not to use temporary locations in this case. """ - try: - return _pywrap_file_io.HasAtomicMove(compat.as_bytes(path)) - except errors.OpError: - # defaults to True - return True + return _pywrap_file_io.HasAtomicMove(compat.as_bytes(path)) @tf_export(v1=["gfile.ListDirectory"])