From ed3fce33d47f6b014ae8f8fc65d668411b865ef9 Mon Sep 17 00:00:00 2001 From: Francesco Siddi Date: Tue, 4 Nov 2014 17:36:07 +0100 Subject: [PATCH] Minor variable renaming --- webservice/bam/application/__init__.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/webservice/bam/application/__init__.py b/webservice/bam/application/__init__.py index 8990ecf..f516e63 100644 --- a/webservice/bam/application/__init__.py +++ b/webservice/bam/application/__init__.py @@ -183,10 +183,12 @@ class FileAPI(Resource): # TODO, once all files are uploaded, unpack and run the tasklist (copy, add, remove # files on a filesystem level and subsequently as svn commands) import zipfile - fh = open(tmp_filepath, 'rb') - z = zipfile.ZipFile(fh) + zipped_file = open(tmp_filepath, 'rb') + z = zipfile.ZipFile(zipped_file) z.extractall(os.path.splitext(tmp_filepath)[0]) - fh.close() + zipped_file.close() + + # TODO, dry run commit (using committ message) # Seems not easily possible with SVN @@ -205,7 +207,6 @@ class FileAPI(Resource): else: return jsonify(message='File not allowed') - @staticmethod def pack_fn(filepath): import os