2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-21 17:11:58 +00:00

Fix non-client fallback

If client doesn't provide file,
then we need to open by name.
This commit is contained in:
Jarrod Johnson 2021-03-02 15:15:54 -05:00
parent e01a7cf4fb
commit 5ed0b50110
3 changed files with 3 additions and 3 deletions

View File

@ -597,7 +597,7 @@ class MediaImporter(object):
if cfm and media in cfm.clientfiles:
medfile = cfm.clientfiles[media]
else:
medfile = open(medfile, 'rb')
medfile = open(media, 'rb')
identity = fingerprint(medfile)
if not identity:
raise exc.InvalidArgumentException('Unsupported Media')

View File

@ -1528,7 +1528,7 @@ class IpmiHandler(object):
datfile = None
if filename in self.cfm.clientfiles:
cf = self.cfm.clientfiles[filename]
datfile = os.fdopen(os.dup(cf.filenoe()), cf.mode)
datfile = os.fdopen(os.dup(cf.fileno()), cf.mode)
if datfile is None and not os.access(filename, os.R_OK):
errstr = ('{0} is not readable by confluent on {1} '
'(ensure confluent user or group can access file '

View File

@ -1373,7 +1373,7 @@ class IpmiHandler(object):
datfile = None
if filename in self.cfm.clientfiles:
cf = self.cfm.clientfiles[filename]
datfile = os.fdopen(os.dup(cf.filenoe()), cf.mode)
datfile = os.fdopen(os.dup(cf.fileno()), cf.mode)
if datfile is None and not os.access(filename, os.R_OK):
errstr = ('{0} is not readable by confluent on {1} '
'(ensure confluent user or group can access file '