Ejemplo n.º 1
0
class InvenioUploader(MARCXMLUploader):
    def __init__(self, *args, **kwargs):
        super(InvenioUploader, self).__init__(*args, **kwargs)
        url = self.backend.agent.settings.get("server_url")
        self.connector = InvenioConnector(url)

    def upload_xml(self, xml):
        result = self.connector.upload_marcxml(xml, "-ir").read()
        if not isinstance(result, long) and not result.startswith("[INFO]"):
            raise InvenioUploaderError(result.strip())
Ejemplo n.º 2
0
 def __init__(self, *args, **kwargs):
     super(InvenioUploader, self).__init__(*args, **kwargs)
     url = self.backend.agent.settings.get("server_url")
     self.connector = InvenioConnector(url)