fix list_slices
[sfa.git] / sfa / trust / credential.py
index a18019d..07f8680 100644 (file)
@@ -40,17 +40,18 @@ try:
 except:\r
     pass\r
 \r
-from sfa.util.faults import *\r
+from xml.parsers.expat import ExpatError\r
+\r
+from sfa.util.faults import CredentialNotVerifiable, ChildRightsNotSubsetOfParent\r
 from sfa.util.sfalogging import logger\r
 from sfa.util.sfatime import utcparse\r
-from sfa.trust.certificate import Keypair\r
 from sfa.trust.credential_legacy import CredentialLegacy\r
 from sfa.trust.rights import Right, Rights, determine_rights\r
 from sfa.trust.gid import GID\r
 from sfa.util.xrn import urn_to_hrn, hrn_authfor_hrn\r
 \r
 # 2 weeks, in seconds \r
-DEFAULT_CREDENTIAL_LIFETIME = 86400 * 14\r
+DEFAULT_CREDENTIAL_LIFETIME = 86400 * 31\r
 \r
 \r
 # TODO:\r
@@ -277,6 +278,7 @@ class Credential(object):
             self.decode()\r
         return self.gidObject.get_printable_subject()\r
 \r
+    # sounds like this should be __repr__ instead ??\r
     def get_summary_tostring(self):\r
         if not self.gidObject:\r
             self.decode()\r
@@ -362,8 +364,6 @@ class Credential(object):
         if not self.gidObject:\r
             self.decode()\r
         return self.gidObject\r
-\r
-\r
             \r
     ##\r
     # Expiration: an absolute UTC time of expiration (as either an int or string or datetime)\r
@@ -402,8 +402,7 @@ class Credential(object):
         if isinstance(privs, str):\r
             self.privileges = Rights(string = privs)\r
         else:\r
-            self.privileges = privs\r
-        \r
+            self.privileges = privs        \r
 \r
     ##\r
     # return the privileges as a Rights object\r