def _checkAndCreateDomainErrback(self, error, domain):
        if hasattr(error, "value") and hasattr(error.value, "status"):
            if int(error.value.status) == 400:  
                d = self.createDomain(domain)
                d.addErrback(self._checkAndCreateDomainErrback2, domain)
                return d
        message = "Could not find or create domain '%s'." % domain
        raise Exception(message)
dataset/ETHPy150Open wehriam/awspider/awspider/aws/sdb.py/AmazonSDB._checkAndCreateDomainErrback/original