Cleanup: use file-context
This commit is contained in:
@@ -183,12 +183,9 @@ class FileAPI(Resource):
|
|||||||
# TODO, once all files are uploaded, unpack and run the tasklist (copy, add, remove
|
# TODO, once all files are uploaded, unpack and run the tasklist (copy, add, remove
|
||||||
# files on a filesystem level and subsequently as svn commands)
|
# files on a filesystem level and subsequently as svn commands)
|
||||||
import zipfile
|
import zipfile
|
||||||
zipped_file = open(tmp_filepath, 'rb')
|
with open(tmp_filepath, 'rb') as zipped_file:
|
||||||
z = zipfile.ZipFile(zipped_file)
|
z = zipfile.ZipFile(zipped_file)
|
||||||
z.extractall(os.path.splitext(tmp_filepath)[0])
|
z.extractall(os.path.splitext(tmp_filepath)[0])
|
||||||
zipped_file.close()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# TODO, dry run commit (using committ message)
|
# TODO, dry run commit (using committ message)
|
||||||
# Seems not easily possible with SVN
|
# Seems not easily possible with SVN
|
||||||
|
Reference in New Issue
Block a user