mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-22 01:22:00 +00:00
Fix capture of non-selinux systems
This commit is contained in:
parent
449b2662fa
commit
f15802a9aa
@ -97,7 +97,10 @@ class FileMasker():
|
||||
filename = filename[1:]
|
||||
filename = os.path.join('/run/imgutil/capin/', filename)
|
||||
for tfilename in glob.glob(filename):
|
||||
secontext = os.getxattr(tfilename, 'security.selinux')
|
||||
try:
|
||||
secontext = os.getxattr(tfilename, 'security.selinux')
|
||||
except OSError:
|
||||
secontext = None
|
||||
if maskwith is None:
|
||||
tmaskwith = tempfile.mkstemp()
|
||||
os.close(tmaskwith[0])
|
||||
|
Loading…
Reference in New Issue
Block a user