mirror of
https://opendev.org/x/pyghmi
synced 2025-01-28 11:57:34 +00:00
Fix support for absolute pathname
The library was failing to work when the basename matched, but full path did not. Change-Id: I92c06be3dbb1166de6d4e53daef6e67345be1e66
This commit is contained in:
parent
6b4cf30a98
commit
2ec9260110
@ -16,6 +16,7 @@
|
||||
|
||||
from datetime import datetime
|
||||
import json
|
||||
import os.path
|
||||
import pyghmi.ipmi.private.session as ipmisession
|
||||
import pyghmi.ipmi.private.util as util
|
||||
import pyghmi.util.webclient as webclient
|
||||
@ -549,7 +550,7 @@ class XCCClient(IMMClient):
|
||||
uploadstate = rsp['state']
|
||||
self.wc.grab_json_response('/api/providers/identity')
|
||||
rsp = json.loads(uploadthread.rsp)
|
||||
if rsp['items'][0]['name'] != filename:
|
||||
if rsp['items'][0]['name'] != os.path.basename(filename):
|
||||
raise Exception('Unexpected response: ' + repr(rsp))
|
||||
progress({'phase': 'upload',
|
||||
'progress': 100.0})
|
||||
|
Loading…
x
Reference in New Issue
Block a user