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:
parent
e01a7cf4fb
commit
5ed0b50110
@ -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')
|
||||
|
@ -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 '
|
||||
|
@ -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 '
|
||||
|
Loading…
Reference in New Issue
Block a user