diff options
author | bescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2006-01-13 05:29:47 +0000 |
---|---|---|
committer | bescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2006-01-13 05:29:47 +0000 |
commit | a5354311095be9d40989ea4fa33d0290d4d9da39 (patch) | |
tree | 80505fdae0ca72411364accd178089deb49d7dd4 /rdiff-backup/rdiff_backup/rpath.py | |
parent | 64ed4237088c9a2b796dab1d44f42199bfe098c3 (diff) | |
download | rdiff-backup-a5354311095be9d40989ea4fa33d0290d4d9da39.tar.gz |
If fsync fails, make sure descriptor still closed
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@745 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/rdiff_backup/rpath.py')
-rw-r--r-- | rdiff-backup/rdiff_backup/rpath.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/rdiff-backup/rdiff_backup/rpath.py b/rdiff-backup/rdiff_backup/rpath.py index 7fed29c..8d6a302 100644 --- a/rdiff-backup/rdiff_backup/rpath.py +++ b/rdiff-backup/rdiff_backup/rpath.py @@ -1148,6 +1148,7 @@ class RPath(RORPath): os.fsync(fd) os.close(fd) except OSError, e: + if locals().has_key('fd'): os.close(fd) if e.errno != errno.EPERM or self.isdir(): raise # Maybe the system doesn't like read-only fsyncing. |