diff -r 69503659fe8f -r 6005880ca8c7 src/cm/converters/__init__.py --- a/src/cm/converters/__init__.py Wed Oct 30 18:08:42 2013 +0100 +++ b/src/cm/converters/__init__.py Wed Oct 30 18:09:34 2013 +0100 @@ -30,9 +30,18 @@ if USE_ABI: from abi_converters import AbiFileConverter converter = AbiFileConverter() - html_input, attachs = converter.convert_to_html(input) - html_input = re.sub(r' awml:style="[^"]*"', '', html_input) - converted_input = pandoc_convert(html_input, 'html', format) + try: + html_input, attachs = converter.convert_to_html(input) + html_input = re.sub(r' awml:style="[^"]*"', '', html_input) + converted_input = pandoc_convert(html_input, 'html', format) + except: + # If Abiword fails for any reason, try libreoffice + html_input, xhtml_input, attachs = convert_oo_to_html_and_xhtml(input) + if format == 'html': + _not_used_css, converted_input = extract_css_body(xhtml_input) + #converted_input = xhtml_input + + converted_input = pandoc_convert(html_input, 'html', format) else: html_input, xhtml_input, attachs = convert_oo_to_html_and_xhtml(input) if format == 'html':