From 39bd4a535ec14fe8714facfae55208939b6d5aea Mon Sep 17 00:00:00 2001 From: Nam Nguyen Hoai Date: Sat, 21 Jan 2017 17:28:12 +0700 Subject: [PATCH] Remove unnecessary f.close() Context manager automatically handles file closing. No need to use f.close() Change-Id: I26382136cef241908252258df813ecfbb56b5aef --- firstapp/samples/shade/durability.py | 1 - 1 file changed, 1 deletion(-) diff --git a/firstapp/samples/shade/durability.py b/firstapp/samples/shade/durability.py index 954e68ec5..e166a7e10 100644 --- a/firstapp/samples/shade/durability.py +++ b/firstapp/samples/shade/durability.py @@ -55,7 +55,6 @@ for fractal in data['objects']: for chunk in r.iter_content(chunk_size=1024): if chunk: f.write(chunk) - f.close() conn.create_object(container=container_name, name=fractal['uuid']) for object in conn.list_objects(container_name):