From c2b70dc5dfa2437b4a9c0770e7d01abcbf2acbd5 Mon Sep 17 00:00:00 2001 From: Steve Slaven Date: Tue, 28 Jul 2009 09:39:24 -0700 Subject: Fixed log message and added log message for serialization 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" ) -- cgit v0.10.2