Implement __repr__ for Sid.
authorJelmer Vernooij <jelmer@samba.org>
Thu, 18 Sep 2008 21:54:53 +0000 (23:54 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Thu, 18 Sep 2008 21:54:53 +0000 (23:54 +0200)
source4/libcli/security/security.i

index 1d964cc3d5aa0b044f37abc93707ef0a1c472753..6ba106bb5f3f05f7b11e0d337a58bdca32197467 100644 (file)
@@ -27,8 +27,8 @@ typedef struct security_token security_token;
 typedef struct security_descriptor security_descriptor;
 %}
 
-%import "../../lib/talloc/talloc.i"
-%import "../util/errors.i"
+%import "../lib/talloc/talloc.i"
+%include "../util/errors.i"
 %import "stdint.i"
 
 enum sec_privilege {
@@ -117,6 +117,10 @@ typedef struct dom_sid {
 #endif
         bool equal(const struct dom_sid *other);
     }
+%pythoncode {
+    def __repr__(self):
+        return "Sid(%r)" % str(self)
+}
 } dom_sid;
 
 %feature("docstring") random_sid "random_sid() -> sid\n" \