diff options
-rwxr-xr-x | fusearchive.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fusearchive.py b/fusearchive.py index 574c630..ba50084 100755 --- a/fusearchive.py +++ b/fusearchive.py @@ -283,11 +283,13 @@ class FuseArchiveSerializer: @staticmethod def dumpfh( fh, obj ): + logging.debug( "Going to serialize " + str( obj ) + " to " + str( fh ) ) fh.truncate( 0 ) + fh.seek( 0 ) f = gzip.GzipFile( None, "wb", gzip_compress_level, fh ) #f = fh - cPickle.dump( obj, f, -1 ) # new file format - f.flush() + cPickle.dump( obj, f ) + fh.flush() @staticmethod def load( f ): @@ -301,6 +303,7 @@ class FuseArchiveSerializer: @staticmethod def loadfh( fh ): + logging.debug( "Going to load from " + str( fh ) ) fh.seek( 0 ) f = gzip.GzipFile( None, "rb", gzip_compress_level, fh ) #f = fh @@ -514,7 +517,7 @@ class FuseArchive(Fuse): self.chunks = magic[ 'chunks' ] self.chunk_size = magic[ 'chunk_size' ] except Exception, e: - logger.critical( e ) + logging.critical( e ) else: if self.wr: logging.debug( "File doesn't exist and we're going to write, creating temp empty file" ) |