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

Checking for ppc64 and setting the SO_PEERCRED to 21.

The socket.SO_PEERCRED seemed to work fine for my
ppc64 RHEL system, but testing today on little-
endian SLES 12 system threw that exception. So
checking if the arch is "ppc64" on the exception
case.
This commit is contained in:
Victor Hu 2015-02-10 17:16:10 -05:00
parent 2f65612b71
commit 3756ee129a

View File

@ -45,7 +45,11 @@ auditlog = None
try:
SO_PEERCRED = socket.SO_PEERCRED
except AttributeError:
SO_PEERCRED = 17
import platform
if "ppc64" in platform.machine():
SO_PEERCRED = 21
else:
SO_PEERCRED = 17
class ClientConsole(object):