From 9ac65af823f27ebc6871b3f681f99318fa5a7b6a Mon Sep 17 00:00:00 2001 From: Tobias Markmann Date: Thu, 13 Mar 2014 18:18:09 +0100 Subject: [PATCH] Support ancient python on XSF machines. Remove debugging comment. --- gen.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gen.py b/gen.py index ff25414a..b2ddc46a 100755 --- a/gen.py +++ b/gen.py @@ -74,10 +74,10 @@ def serializeInlineImage(output_dir, no, attrValue): plaindata = base64.b64decode(data) # Do something smart with mime_type - if mime_type in ('image/png'): + if mime_type in ('image/png', 'image/jpeg'): file_ext = mime_type.split('/')[1] - with open(output_dir + '/' + 'inlineimage-' + str(no) + '.' + file_ext, 'wb') as f: - f.write(plaindata) + f = open(output_dir + '/' + 'inlineimage-' + str(no) + '.' + file_ext, 'wb') + f.write(plaindata) def serializeXEPInlineImages(output_dir, filename): dom = parse(filename) @@ -418,7 +418,7 @@ def main(argv): executeCommand("sed -e '1s///' " + CONFIGPATH + "/extensions.xml > " + XEPPATH + "/../includes/xeplist.txt") - #executeCommand("rm -rfd /tmp/xepbuilder") + executeCommand("rm -rfd /tmp/xepbuilder") makeBundle()