Skip to content

Commit 77780d0

Browse files
committed
rename
1 parent dc649e2 commit 77780d0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/cryptojwt/key_bundle.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ def __init__(self, keys=None, source="", cache_time=300, verify_ssl=True,
181181
self._keys = []
182182
self.remote = False
183183
self.cache_time = cache_time
184-
self.last_fetched = None
185184
self.time_out = 0
186185
self.etag = ""
187186
self.source = None
@@ -190,6 +189,7 @@ def __init__(self, keys=None, source="", cache_time=300, verify_ssl=True,
190189
self.keyusage = keyusage
191190
self.imp_jwks = None
192191
self.last_updated = 0
192+
self.last_remote = None
193193

194194
if httpc:
195195
self.httpc = httpc
@@ -337,10 +337,10 @@ def do_remote(self):
337337

338338
try:
339339
LOGGER.debug('KeyBundle fetch keys from: %s', self.source)
340-
if self.last_fetched is not None:
340+
if self.last_remote is not None:
341341
if "headers" not in self.httpc_params:
342342
self.httpc_params["headers"] = {}
343-
self.httpc_params["headers"]["If-Modified-Since"] = self.last_fetched
343+
self.httpc_params["headers"]["If-Modified-Since"] = self.last_remote
344344
_http_resp = self.httpc('GET', self.source, **self.httpc_params)
345345
except Exception as err:
346346
LOGGER.error(err)
@@ -364,10 +364,10 @@ def do_remote(self):
364364

365365
if hasattr(_http_resp, "headers"):
366366
headers = getattr(_http_resp, "headers")
367-
self.last_fetched = headers.get("last-modified") or headers.get("date")
367+
self.last_remote = headers.get("last-modified") or headers.get("date")
368368

369369
elif _http_resp.status_code == 304: # Not modified
370-
LOGGER.debug("%s not modified since %s", self.source, self.last_fetched)
370+
LOGGER.debug("%s not modified since %s", self.source, self.last_remote)
371371
pass
372372

373373
else:

0 commit comments

Comments
 (0)