prettified speaksfor a little
[sfa.git] / sfa / util / xrn.py
index dfcf3e5..b16ea51 100644 (file)
@@ -110,22 +110,15 @@ class Xrn:
         return Xrn.urn_meaningful(urn).split('+')
 
     @staticmethod
-    def filter_type(urns=[], type=None):
+    def filter_type(urns=None, type=None):
+        if urns is None: urns=[]
         urn_list = []
         if not type:
             return urns
 
         for urn in urns:
             xrn = Xrn(xrn=urn)
-            if not xrn.type:
-                # If an xrn doesn't have a type its probably a hrn. 
-                # We have to make some assumptions on the hrn's type
-                # based on the contents of the hrn.  
-                if type == 'sliver' and '-' in xrn.leaf:
-                    urn_list.append(urn) 
-                elif type != 'sliver' and not '-' in xrn.leaf:
-                    urn_list.append(urn)
-            elif (xrn.type == type):
+            if (xrn.type == type):
                 # Xrn is probably a urn so we can just compare types  
                 urn_list.append(urn)
         return urn_list