From 8ba5db812b7485154d1eb898f75ba132d494934b Mon Sep 17 00:00:00 2001
From: felmer <felmer>
Date: Mon, 10 Nov 2014 15:11:02 +0000
Subject: [PATCH] SSDM-1187: adapt test_multi_data_set_archiving.py to Python
 2.6

SVN: 32770
---
 integration-tests/test_multi_data_set_archiving.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/integration-tests/test_multi_data_set_archiving.py b/integration-tests/test_multi_data_set_archiving.py
index 99ba5cd358d..7c412d02957 100755
--- a/integration-tests/test_multi_data_set_archiving.py
+++ b/integration-tests/test_multi_data_set_archiving.py
@@ -73,8 +73,11 @@ class TestCase(systemtest.testcase.TestCase):
     def extractFromArchive(self, openbisController, tar_file, path_in_tar):
         temp_dir = "%s/data/tmp" % (openbisController.installPath)
         util.printAndFlush("Extract %s from archive %s" % (path_in_tar, tar_file))
-        with tarfile.open(tar_file) as tf:
+        try:
+            tf = tarfile.open(tar_file)
             tf.extract(path_in_tar, temp_dir)
+        finally:
+            tf.close()
         return "%s/%s" % (temp_dir, path_in_tar)
         
     def calculateMD5(self, file_path):
-- 
GitLab