We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 298f21a + 95e2e85 commit 51460f4Copy full SHA for 51460f4
1 file changed
config/kube_config.py
@@ -70,7 +70,8 @@ def _create_temp_file_with_content(content, temp_file_path=None):
70
return _temp_files[content_key]
71
if temp_file_path and not os.path.isdir(temp_file_path):
72
os.makedirs(name=temp_file_path)
73
- _, name = tempfile.mkstemp(dir=temp_file_path)
+ fd, name = tempfile.mkstemp(dir=temp_file_path)
74
+ os.close(fd)
75
_temp_files[content_key] = name
76
with open(name, 'wb') as fd:
77
fd.write(content.encode() if isinstance(content, str) else content)
0 commit comments