From: Thierry Parmentelat Date: Mon, 7 May 2012 14:00:06 +0000 (+0200) Subject: cosmetic: Right(s) have a __repr__ X-Git-Tag: sfa-2.1-6~21 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=7f3e8321821afba5f0fdb49ad3a80357693804db;p=sfa.git cosmetic: Right(s) have a __repr__ --- 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 == []