'Get a repository by namespace.
Arguments:
namespace:
Look up this namespace in the RepoPath, and return it if found.
Optional Arguments:
default:
If default is provided, return it when the namespace
isn\'t found.  If not, raise an UnknownNamespaceError.'

def get_repo(self, namespace, default=NOT_PROVIDED):

    fullspace = ('%s.%s' % (self.super_namespace, namespace))
    if (fullspace not in self.by_namespace):
        if (default == NOT_PROVIDED):
            raise UnknownNamespaceError(namespace)
        return default
    return self.by_namespace[fullspace]
