We need to make sure the API gets cleaned up to return consistent values, and that the documentation gets written to indicate what the desired return type is. def packages(self, id, name=None): """ Return list of Package objects in this Repo """ repo = self._get_existing_repo(id) packages = repo['packages'] # XXX this is WRONG!!!!, we are returning a dict if name is None # otherwise we are returning a list! if name is None: return packages return [p for p in packages.values() if p['name'].find(name) >= 0]
Fixed api to return list in both cases and added api docs.
Fixed in build 0.78.
Preethi asked me to comment on how to verify it. From what I can see, the only place this call is being used is in test cases. So basically, if the unit tests pass, then this works. I'm going to assume a test case was added to test both the name=None and name=NotNone cases, so as long as hudson isn't blowing up, this should be good.
moving to verified as per the above comment!
Closing with Community Release 15 pulp-0.0.223-4.