diff --git a/clients/client-python/gravitino/filesystem/gvfs.py b/clients/client-python/gravitino/filesystem/gvfs.py index 0faaf3898a2..5690cfc8ac4 100644 --- a/clients/client-python/gravitino/filesystem/gvfs.py +++ b/clients/client-python/gravitino/filesystem/gvfs.py @@ -137,13 +137,9 @@ def exists(self, path, **kwargs): :return A file or directory exists, a boolean """ context: FilesetContext = self._get_fileset_context(path) - try: - context.fs.info( - self._strip_storage_protocol(context.storage_type, context.actual_path) - ) - except FileNotFoundError: - return False - return True + return context.fs.exists( + self._strip_storage_protocol(context.storage_type, context.actual_path) + ) def cp_file(self, path1, path2, **kwargs): """Copy a file.