From: Douglas Bagnall Date: Thu, 25 Oct 2018 09:09:59 +0000 (+1300) Subject: python/samdb: properly use property() X-Git-Tag: tdb-1.3.17~1134 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b60afec7b6c21df58a8efa2c54f033badb4cd7e;p=thirdparty%2Fsamba.git 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 --- 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)