From 7f3e8321821afba5f0fdb49ad3a80357693804db Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Mon, 7 May 2012 16:00:06 +0200 Subject: [PATCH] cosmetic: Right(s) have a __repr__ --- sfa/trust/rights.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sfa/trust/rights.py b/sfa/trust/rights.py index eb0bb747..1b8baa4f 100644 --- a/sfa/trust/rights.py +++ b/sfa/trust/rights.py @@ -94,6 +94,8 @@ class Right: self.kind = kind self.delegate = delegate + def __repr__ (self): return ""%self.kind + ## # Test to see if this right object is allowed to perform an operation. # Returns True if the operation is allowed, False otherwise. @@ -148,6 +150,8 @@ class Rights: if string: self.load_from_string(string) + def __repr__ (self): return "[" + " ".join( ["%s"%r for r in self.rights]) + "]" + def is_empty(self): return self.rights == [] -- 2.45.2