From 0b60afec7b6c21df58a8efa2c54f033badb4cd7e Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Thu, 25 Oct 2018 22:09:59 +1300 Subject: [PATCH] python/samdb: properly use property() Python's property() function works like this: property([getter[, setter[, delete[, doc]]]]) but we have been forgetting the delete function, or rather setting it to be a string. A string is not callable and is unlikely to succeed at deleting the property. Signed-off-by: Douglas Bagnall Reviewed-by: Andreas Schneider --- python/samba/samdb.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/samba/samdb.py b/python/samba/samdb.py index fa3e4b1b334..1abd94b1938 100644 --- a/python/samba/samdb.py +++ b/python/samba/samdb.py @@ -676,7 +676,7 @@ accountExpires: %u return dsdb._samdb_get_domain_sid(self) domain_sid = property(get_domain_sid, set_domain_sid, - "SID for the domain") + doc="SID for the domain") def set_invocation_id(self, invocation_id): """Set the invocation id for this SamDB handle. @@ -690,7 +690,7 @@ accountExpires: %u return dsdb._samdb_ntds_invocation_id(self) invocation_id = property(get_invocation_id, set_invocation_id, - "Invocation ID GUID") + doc="Invocation ID GUID") def get_oid_from_attid(self, attid): return dsdb._dsdb_get_oid_from_attid(self, attid) -- 2.47.2