remove the try except block around hasAtomicMove

This commit is contained in:
Rahul Huilgol 2020-02-20 23:05:26 +00:00
parent e65e99c433
commit 411f70eb0e

View File

@ -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"])