type may be None
authorTony Mack <tmack@paris.CS.Princeton.EDU>
Wed, 19 Jan 2011 18:42:48 +0000 (13:42 -0500)
committerTony Mack <tmack@paris.CS.Princeton.EDU>
Wed, 19 Jan 2011 18:42:48 +0000 (13:42 -0500)
sfa/util/xrn.py

index 8ee8331..d33bc4e 100644 (file)
@@ -139,7 +139,7 @@ class Xrn:
         if self.hrn.startswith(Xrn.URN_PREFIX):
             raise SfaAPIError, "Xrn.hrn_to_urn, hrn=%s"%self.hrn
 
-        if self.type.startswith('authority'):
+        if self.type and self.type.startswith('authority'):
             self.authority = Xrn.hrn_split(self.hrn)
             type_parts = self.type.split("+")
             self.type = type_parts[0]