From: Tony Mack Date: Tue, 18 Dec 2012 16:09:39 +0000 (-0500) Subject: get_subject() returns an empty string if credential has no gid object X-Git-Tag: sfa-3.0-0~47 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=38b084acb5b1e64d77fa3427eb02e7090decfb47;p=sfa.git get_subject() returns an empty string if credential has no gid object --- diff --git a/sfa/trust/credential.py b/sfa/trust/credential.py index 9a796a03..bd6758fa 100644 --- a/sfa/trust/credential.py +++ b/sfa/trust/credential.py @@ -287,9 +287,12 @@ class Credential(object): break def get_subject(self): + subject = "" if not self.gidObject: self.decode() - return self.gidObject.get_printable_subject() + if self.gidObject: + subject = self.self.gidObject.get_printable_subject() + return subject # sounds like this should be __repr__ instead ?? def get_summary_tostring(self):