def _extract_status(self, reply): if hasattr(reply, "dmStatus"): status = models.dmStatus(reply.dmStatus) code_attr = "dmStatusCode" message_attr = "dmStatusMessage" elif hasattr(reply, "dbStatus"): status = models.dbStatus(reply.dbStatus) code_attr = "dbStatusCode" message_attr = "dbStatusMessage" else: raise ValueError("Neither dmStatus, nor dbStatus found in reply:\n%s" % reply) status_code = getattr(status, code_attr) if status_code != "0000": status_message = getattr(status, message_attr) raise DSSOAPException(status_code, status_message) return status
def ChangeISDSPassword(self, old_pass, new_pass): reply = self.soap_client.service.ChangeISDSPassword(old_pass, new_pass) status = models.dbStatus(reply) return Reply(status, None)