From e2b130e73e4b43c28e9049120f05498f50886f68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Fri, 3 Apr 2015 13:01:45 +0200 Subject: [PATCH] don't break on odt files missing a styles.xml component --- odf2legi/odf2legi.py | 1 + 1 file changed, 1 insertion(+) diff --git a/odf2legi/odf2legi.py b/odf2legi/odf2legi.py index 68d417b..10c9c4f 100644 --- a/odf2legi/odf2legi.py +++ b/odf2legi/odf2legi.py @@ -787,6 +787,7 @@ def convert(input_filename, output_filename): z = zipfile.ZipFile(input_filename) content = None metadata = None + styles = None for zfile in z.namelist(): if zfile == 'content.xml': content = z.read(zfile)