'Return the domain instance with the specified name.
Raises an ExtensionError if the domain is not registered.'

def get_domain(self, domainname):

    try:
        return self.domains[domainname]
    except KeyError:
        raise ExtensionError(('Domain    %r    is    not    registered' % domainname))
