def csvglossary_push(self, path, locale_map, comments_header): csvconverter = CSVConverter() json = csvconverter.convert_to_json(path, locale_map, comments_header) try: content = self.zanata_resource.glossary.commit_glossary(json) if content: self.log.info("Successfully pushed glossary to the server") except ZanataException, e: self.log.error(str(e))
def csvglossary_push(self, path, url, username, apikey, locale_map, comments_header): csvconverter = CSVConverter() json = csvconverter.convert_to_json(path, locale_map, comments_header) glossary = GlossaryService(url) try: content = glossary.commit_glossary(username, apikey, json) if content: self.log.info("Successfully pushed glossary to the server") except ZanataException, e: self.log.error(str(e))
def csvglossary_push(self, path, url, username, apikey, locale_map, comments_header): csvconverter = CSVConverter() json = csvconverter.convert_to_json(path, locale_map, comments_header) glossary = GlossaryService(url) try: content = glossary.commit_glossary(username, apikey, json) if content: self.log.info("Successfully pushed glossary to the server") except UnAvaliableResourceException: self.log.error("Can not push") except UnavailableServiceError: self.log.error("Service Temporarily Unavailable, stop processing!") except BadRequestBodyException, e: self.log.error(e.msg)