From 38b084acb5b1e64d77fa3427eb02e7090decfb47 Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Tue, 18 Dec 2012 11:09:39 -0500 Subject: [PATCH] get_subject() returns an empty string if credential has no gid object --- sfa/trust/credential.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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): -- 2.43.0