Catch missing function listxattr on some Linux host.

This commit is contained in:
grossmj 2017-05-08 21:02:23 +07:00
parent bfee08459d
commit 48dae085aa

View File

@ -344,7 +344,7 @@ class BaseManager:
# test the 2nd byte and check if the 13th bit (CAP_NET_RAW) is set # test the 2nd byte and check if the 13th bit (CAP_NET_RAW) is set
if struct.unpack("<IIIII", caps)[1] & 1 << 13: if struct.unpack("<IIIII", caps)[1] & 1 << 13:
return True return True
except OSError as e: except (AttributeError, OSError) as e:
log.error("could not determine if CAP_NET_RAW capability is set for {}: {}".format(executable, e)) log.error("could not determine if CAP_NET_RAW capability is set for {}: {}".format(executable, e))
return False return False