mirror of
https://github.com/samba-team/samba.git
synced 2025-07-19 04:59:10 +03:00
pysamdb: move normalise_int32() to common module
this will be needed in quite a few places
This commit is contained in:
committed by
Andrew Bartlett
parent
68d79eb6ef
commit
d994ef2056
@ -50,3 +50,8 @@ def confirm(msg, forced = False, allow_all=False):
|
||||
print("Unknown response '%s'" % v)
|
||||
|
||||
|
||||
def normalise_int32(ivalue):
|
||||
'''normalise a ldap integer to signed 32 bit'''
|
||||
if int(ivalue) & 0x80000000:
|
||||
return str(int(ivalue) - 0x100000000)
|
||||
return str(ivalue)
|
||||
|
Reference in New Issue
Block a user