fix bug in Resolve
authorTony Mack <tmack@paris.CS.Princeton.EDU>
Thu, 16 Feb 2012 21:39:02 +0000 (16:39 -0500)
committerTony Mack <tmack@paris.CS.Princeton.EDU>
Thu, 16 Feb 2012 21:39:02 +0000 (16:39 -0500)
sfa/managers/registry_manager.py

index 9fd2659..04daa48 100644 (file)
@@ -102,10 +102,10 @@ class RegistryManager:
     def Resolve(self, api, xrns, type=None, full=True):
     
         if not isinstance(xrns, types.ListType):
-            xrns = [xrns]
             # try to infer type if not set and we get a single input
             if not type:
                 type = Xrn(xrns).get_type()
+            xrns = [xrns]
         hrns = [urn_to_hrn(xrn)[0] for xrn in xrns] 
         # load all known registry names into a prefix tree and attempt to find
         # the longest matching prefix