rdiff-backup-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Rdiff-backup-commits] Changes to rdiff-backup/rdiff_backup/librsync.py


From: Ben Escoto
Subject: [Rdiff-backup-commits] Changes to rdiff-backup/rdiff_backup/librsync.py
Date: Thu, 27 Oct 2005 02:16:41 -0400

Index: rdiff-backup/rdiff_backup/librsync.py
diff -u rdiff-backup/rdiff_backup/librsync.py:1.4 
rdiff-backup/rdiff_backup/librsync.py:1.5
--- rdiff-backup/rdiff_backup/librsync.py:1.4   Tue Jul 22 09:07:43 2003
+++ rdiff-backup/rdiff_backup/librsync.py       Thu Oct 27 06:16:39 2005
@@ -1,4 +1,4 @@
-# Copyright 2002 Ben Escoto
+# Copyright 2002 2005 Ben Escoto
 #
 # This file is part of rdiff-backup.
 #
@@ -24,7 +24,8 @@
 
 """
 
-import _librsync, types, array
+import types, array
+import _librsync
 
 blocksize = _librsync.RS_JOB_BLOCKSIZE
 
@@ -95,15 +96,16 @@
                        new_in = self.infile.read(blocksize)
                        if not new_in:
                                self.infile_eof = 1
-                               assert not self.infile.close()
+                               self.infile_closeval = self.infile.close()
                                self.infile_closed = 1
                                break
                        self.inbuf += new_in
 
        def close(self):
-               """Close infile"""
-               if not self.infile_closed: assert not self.infile.close()
+               """Close infile and pass on infile close value"""
                self.closed = 1
+               if self.infile_closed: return self.infile_closeval
+               else: return self.infile.close()
 
 
 class SigFile(LikeFile):




reply via email to

[Prev in Thread] Current Thread [Next in Thread]