From 2ec926011032372b97ca9e7e5cc507cb6850a8d4 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 25 Jul 2017 16:53:40 -0400 Subject: [PATCH] Fix support for absolute pathname The library was failing to work when the basename matched, but full path did not. Change-Id: I92c06be3dbb1166de6d4e53daef6e67345be1e66 --- pyghmi/ipmi/oem/lenovo/imm.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyghmi/ipmi/oem/lenovo/imm.py b/pyghmi/ipmi/oem/lenovo/imm.py index 419898e4..29bcddd1 100644 --- a/pyghmi/ipmi/oem/lenovo/imm.py +++ b/pyghmi/ipmi/oem/lenovo/imm.py @@ -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})