[Libreoffice-commits] core.git: solenv/bin

Samuel Mehrbrodt Samuel.Mehrbrodt at cib.de
Thu Sep 28 15:00:31 UTC 2017


 solenv/bin/pack_images.py |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 7757a30a6bad8389eae2eec63f2066793e7ef3cf
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
Date:   Thu Sep 28 16:53:46 2017 +0200

    Python 2.6 compatibility for pack_images.py
    
    Change-Id: I61b315bc644763749acf82d2dd7e4a3140d8f8b1
    Reviewed-on: https://gerrit.libreoffice.org/42911
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Michael Stahl <mstahl at redhat.com>

diff --git a/solenv/bin/pack_images.py b/solenv/bin/pack_images.py
index 9a68d97821f0..0f493c8f3035 100755
--- a/solenv/bin/pack_images.py
+++ b/solenv/bin/pack_images.py
@@ -14,6 +14,7 @@ from __future__ import with_statement
 
 import argparse
 from collections import OrderedDict
+import contextlib
 import logging
 import os
 import shutil
@@ -242,7 +243,7 @@ def create_zip_archive(zip_list, links, tmp_dir, tmp_zip_file, sort_file=None):
 
     ordered_zip_list = optimize_zip_layout(zip_list, sort_file)
 
-    with zipfile.ZipFile(tmp_zip_file, 'w') as tmp_zip:
+    with contextlib.closing(zipfile.ZipFile(tmp_zip_file, 'w')) as tmp_zip:
         if links.keys():
             LOGGER.info("Add file 'links.txt' to zip archive")
             create_links_file(tmp_dir, links)


More information about the Libreoffice-commits mailing list