summaryrefslogtreecommitdiff
path: root/rdiff-backup/rdiff_backup/metadata.py
diff options
context:
space:
mode:
authorbescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2003-02-11 07:37:12 +0000
committerbescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2003-02-11 07:37:12 +0000
commit9613406fbab1949f66fe7858590cab990c7b4b25 (patch)
tree573a6106da5bb7ead2c4f17c45be664063d67e01 /rdiff-backup/rdiff_backup/metadata.py
parente18d568c6fdfa1a73fea01362d5bdf31aaa0d5b5 (diff)
downloadrdiff-backup-9613406fbab1949f66fe7858590cab990c7b4b25.tar.gz
First pass at integrating regress code
At this point most of the tests work, but there are still problems with the finaltest error tests on /proc, and with some selection options. The regress code is totally unchecked, and regresstest.py is unwritten. git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@277 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/rdiff_backup/metadata.py')
-rw-r--r--rdiff-backup/rdiff_backup/metadata.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/rdiff-backup/rdiff_backup/metadata.py b/rdiff-backup/rdiff_backup/metadata.py
index d4eff8c..ec86168 100644
--- a/rdiff-backup/rdiff_backup/metadata.py
+++ b/rdiff-backup/rdiff_backup/metadata.py
@@ -55,7 +55,7 @@ field names and values.
"""
from __future__ import generators
-import re, gzip
+import re, gzip, os
import log, Globals, rpath, Time, robust, increment
class ParsingError(Exception):
@@ -280,6 +280,9 @@ def WriteMetadata(rorp):
def CloseMetadata():
"""Close the metadata file"""
global metadata_rp, metadata_fileobj
+ try: fileno = metadata_fileobj.fileno() # will not work if GzipFile
+ except AttributeError: fileno = metadata_fileobj.fileobj.fileno()
+ os.fsync(fileno)
result = metadata_fileobj.close()
metadata_fileobj = None
metadata_rp.setdata()