We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e017bd2 commit 7002122Copy full SHA for 7002122
1 file changed
juju/client/proxy/kubernetes/proxy.py
@@ -2,11 +2,14 @@
2
# Licensed under the Apache V2, see LICENCE file for details.
3
import os
4
import tempfile
5
+import logging
6
7
from juju.client.proxy.proxy import Proxy, ProxyNotConnectedError
8
from kubernetes import client
9
from kubernetes.stream import portforward
10
11
+log = logging.getLogger('juju.client.connection')
12
+
13
14
class KubernetesProxy(Proxy):
15
def __init__(
@@ -60,7 +63,10 @@ def connect(self):
60
63
61
64
def __del__(self):
62
65
self.close()
- os.unlink(self.temp_ca_file.name)
66
+ try:
67
+ os.unlink(self.temp_ca_file.name)
68
+ except FileNotFoundError:
69
+ log.debug(f"file {self.temp_ca_file.name} not found")
70
71
def close(self):
72
try:
0 commit comments