From 1a825c9761f9139e3ad65857b3185ca8d098bf83 Mon Sep 17 00:00:00 2001
From: Christoph Groth <christoph.groth@cea.fr>
Date: Wed, 21 Nov 2012 09:56:15 +0100
Subject: [PATCH] make setup.py work again with python 2.6

---
 setup.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/setup.py b/setup.py
index c35fc091..88c31915 100755
--- a/setup.py
+++ b/setup.py
@@ -75,10 +75,11 @@ class build_tut(Command):
             os.mkdir(TUT_DIR)
         for in_fname in glob.glob(TUT_GLOB):
             out_fname = os.path.join(TUT_DIR, os.path.basename(in_fname))
-            with open(in_fname) as in_file, open(out_fname, 'w') as out_file:
-                for line in in_file:
-                    if not line.startswith(TUT_HIDDEN_PREFIX):
-                        out_file.write(line)
+            with open(in_fname) as in_file:
+                with open(out_fname, 'w') as out_file:
+                    for line in in_file:
+                        if not line.startswith(TUT_HIDDEN_PREFIX):
+                            out_file.write(line)
 
 
 # Our version of the "build" command also makes sure the tutorial is made.
-- 
GitLab