mirror of
https://github.com/samba-team/samba.git
synced 2025-08-03 04:22:09 +03:00
python/dsdb_dn: Add a generic get_bytes method on DNs
Pair-programmed-with: Bob Campbell <bobcampbell@catalyst.net.nz> Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
committed by
Andrew Bartlett
parent
ee04f96b69
commit
213349b4bf
@ -19,6 +19,7 @@
|
||||
|
||||
import ldb
|
||||
import dsdb
|
||||
import binascii
|
||||
|
||||
|
||||
def confirm(msg, forced=False, allow_all=False):
|
||||
@ -97,3 +98,7 @@ class dsdb_Dn(object):
|
||||
if self.prefix == '':
|
||||
return None
|
||||
return int(self.binary, 16)
|
||||
|
||||
def get_bytes(self):
|
||||
'''return binary as a byte string'''
|
||||
return binascii.unhexlify(self.binary)
|
||||
|
Reference in New Issue
Block a user