Skip to content
This repository was archived by the owner on Mar 13, 2022. It is now read-only.

Don't fail if tmp files have been deleted #122

Closed
wants to merge 2 commits into from
Closed
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
2 changes: 1 addition & 1 deletion config/kube_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def _create_temp_file_with_content(content):
# Because we may change context several times, try to remember files we
# created and reuse them at a small memory cost.
content_key = str(content)
if content_key in _temp_files:
if content_key in _temp_files and os.path.isfile(_temp_files[content_key]):
return _temp_files[content_key]
_, name = tempfile.mkstemp()
_temp_files[content_key] = name
Expand Down