diff options
| author | Michael E Brown <mebrown@michaels-house.net> | 2007-11-17 22:30:04 -0600 |
|---|---|---|
| committer | Michael E Brown <mebrown@michaels-house.net> | 2007-11-17 22:30:04 -0600 |
| commit | e5be729554beb2ed1dce3bc77fea304aecfaf11d (patch) | |
| tree | 8caf3c11df1b8b97aa5aa5aa97e86acae6b56055 /src/py-libs/util.py | |
| parent | e1b25747b221b152205ce693d077b9ced560e554 (diff) | |
| download | mock-e5be729554beb2ed1dce3bc77fea304aecfaf11d.tar.gz mock-e5be729554beb2ed1dce3bc77fea304aecfaf11d.tar.xz mock-e5be729554beb2ed1dce3bc77fea304aecfaf11d.zip | |
dont try to run personality() if we dont have a defined value.
Diffstat (limited to 'src/py-libs/util.py')
| -rw-r--r-- | src/py-libs/util.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/py-libs/util.py b/src/py-libs/util.py index 8553bac..1045d41 100644 --- a/src/py-libs/util.py +++ b/src/py-libs/util.py @@ -188,13 +188,13 @@ personality_defs['i386'] = 0x0008 # ... need to add ppc/ppc64... @traceLog(log) -def condPersonality(per): - if per is None: return +def condPersonality(per=None): + if personality_defs.get(per,None) is None: return import ctypes _libc = ctypes.cdll.LoadLibrary("libc.so.6") _libc.personality.argtypes = [ctypes.c_ulong] _libc.personality.restype = ctypes.c_int - _libc.personality(personality_defs.get(per, 0x00)) + _libc.personality(personality_defs[per]) # logger = # output = [1|0] |
