2
0
mirror of https://opendev.org/x/pyghmi synced 2026-01-10 02:02:30 +00:00

Force token refresh on screenshot for XCC3

The screenshot call will return an error if used with
a stale xauth token. To be safe, just always refresh
the token, since this is never going to be a super fast
request anyway.

Change-Id: Icb06352a94f20eadc635656a2cd2827aeb55a214
This commit is contained in:
Jarrod Johnson
2025-04-15 15:43:19 -04:00
parent ae19b05df4
commit 2bade4a2a7

View File

@@ -43,8 +43,10 @@ class OEMHandler(generic.OEMHandler):
return True
def get_screenshot(self, outfile):
wc = self.webclient.dupe()
self._get_session_token(wc)
url = '/web_download/Mini_ScreenShot.jpg'
fd = webclient.FileDownloader(self.webclient, url, outfile)
fd = webclient.FileDownloader(wc, url, outfile)
fd.start()
fd.join()