diff options
author | Joel Granados Moreno <jgranado@redhat.com> | 2009-04-09 12:05:12 +0200 |
---|---|---|
committer | Joel Granados Moreno <jgranado@redhat.com> | 2009-04-10 12:57:57 +0200 |
commit | f4ce3c99b316ce9f927786bd6df8594c53a12f0a (patch) | |
tree | 6acc836c30377004ff71655ddb6fa3c4e5fd6318 /storage/formats | |
parent | b44b4fd62394eebfdc0bdb86532210426593b7cd (diff) | |
download | anaconda-f4ce3c99b316ce9f927786bd6df8594c53a12f0a.tar.gz anaconda-f4ce3c99b316ce9f927786bd6df8594c53a12f0a.tar.xz anaconda-f4ce3c99b316ce9f927786bd6df8594c53a12f0a.zip |
Close file descriptors when an error occurs.
Diffstat (limited to 'storage/formats')
-rw-r--r-- | storage/formats/__init__.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/storage/formats/__init__.py b/storage/formats/__init__.py index 784bb1c79..e68684c31 100644 --- a/storage/formats/__init__.py +++ b/storage/formats/__init__.py @@ -258,8 +258,10 @@ class DeviceFormat(object): pass else: log.error("error zeroing out %s: %s" % (self.device, e)) + os.close(fd) except Exception as e: log.error("error zeroing out %s: %s" % (self.device, e)) + os.close(fd) self.exists = False |