def success(self):
        if self.status == httplib.OK or self.status == httplib.CREATED:
            try:
                j_body = json.loads(self.body)
            except ValueError:
                self.error = "JSON response cannot be decoded."
                return False
            if j_body['errno'] == 0:
                return True
            else:
                self.error = j_body['message'] % "ECP error: %s"
                return False
        elif self.status == httplib.UNAUTHORIZED:
            raise InvalidCredsException()
        else:
            self.error = "HTTP Error Code: %s" % self.status
        return False
dataset/ETHPy150Open secondstory/dewpoint/libcloud/drivers/ecp.py/ECPResponse.success/swapped operands of `%`