diff options
author | Stefan Metzmacher <metze@samba.org> | 2012-01-05 16:34:02 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-01-09 10:28:30 +0100 |
commit | 507e75ebb9bcacc1e75cb13af77a9fc08c49015f (patch) | |
tree | 140475c16bde8d353b94c207da22199a59afd9ba /source4/scripting/python | |
parent | 1be5e5895865996425d39abf79f0e42b23d9e64c (diff) | |
download | samba-507e75ebb9bcacc1e75cb13af77a9fc08c49015f.tar.gz samba-507e75ebb9bcacc1e75cb13af77a9fc08c49015f.tar.bz2 samba-507e75ebb9bcacc1e75cb13af77a9fc08c49015f.zip |
s4:python/samba/ndr.py: add an optional 'allow_remaining' to ndr_unpack()
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Jan 9 10:28:30 CET 2012 on sn-devel-104
Diffstat (limited to 'source4/scripting/python')
-rw-r--r-- | source4/scripting/python/samba/ndr.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/scripting/python/samba/ndr.py b/source4/scripting/python/samba/ndr.py index ccab1123d9..39e4a482ef 100644 --- a/source4/scripting/python/samba/ndr.py +++ b/source4/scripting/python/samba/ndr.py @@ -33,15 +33,16 @@ def ndr_pack(object): return ndr_pack() -def ndr_unpack(cls, data): +def ndr_unpack(cls, data, allow_remaining=False): """NDR unpack an object. :param cls: Class of the object to unpack :param data: Buffer to unpack + :param allow_remaining: allows remaining data at the end (default=False) :return: Unpacked object """ object = cls() - object.__ndr_unpack__(data) + object.__ndr_unpack__(data, allow_remaining=allow_remaining) return object |