summaryrefslogtreecommitdiffstats
path: root/gluster
diff options
context:
space:
mode:
authorThiago da Silva <thiago@redhat.com>2014-03-21 16:02:36 -0400
committerLuis Pabon <lpabon@redhat.com>2014-03-26 13:30:22 -0700
commit09688dc594e9d82ba3a85b55fa569ccd2bb0b0df (patch)
treee07193b75a23b7c32c0d46961bfdcbbac2b00d01 /gluster
parent972c252c41e516e7ce54406ac79b0a35adb88bca (diff)
fix __exit__ function not closing file descriptor
The file descriptor is not being closed because it is self._fd is None Change-Id: I7edc8a78b09bdd76d59ac8f3dbc809af652f9b0e Signed-off-by: Thiago da Silva <thiago@redhat.com> Reviewed-on: http://review.gluster.org/7315 Reviewed-by: Luis Pabon <lpabon@redhat.com> Tested-by: Luis Pabon <lpabon@redhat.com>
Diffstat (limited to 'gluster')
-rw-r--r--gluster/swift/obj/diskfile.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/gluster/swift/obj/diskfile.py b/gluster/swift/obj/diskfile.py
index b3e91bc..1f8aa57 100644
--- a/gluster/swift/obj/diskfile.py
+++ b/gluster/swift/obj/diskfile.py
@@ -789,7 +789,7 @@ class DiskFile(object):
self._metadata = None
if self._fd is not None:
fd, self._fd = self._fd, None
- if self._fd > -1:
+ if fd > -1:
do_close(fd)
def get_metadata(self):