Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Fixed
-----

- ``LocalGlobusConnectServer.info_dict`` can no longer raise ``FileNotFoundError``
if the ``info.json`` file is removed while it is being loaded. (:pr:`NUMBER`)
4 changes: 3 additions & 1 deletion src/globus_sdk/local_endpoint/server/endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def info_dict(self) -> dict[str, t.Any] | None:
Server on the container host.
"""
if self._loaded_info is None:
if self.info_path.is_file():
try:
with open(self.info_path, encoding="utf-8") as fp:
try:
parsed_data = json.load(fp)
Expand All @@ -46,6 +46,8 @@ def info_dict(self) -> dict[str, t.Any] | None:
else:
if isinstance(parsed_data, dict):
self._loaded_info = t.cast(t.Dict[str, t.Any], parsed_data)
except (FileNotFoundError, IsADirectoryError):
pass
return self._loaded_info

@info_dict.deleter
Expand Down
Loading