aboutsummaryrefslogtreecommitdiffstats
path: root/fusearchive.py
diff options
context:
space:
mode:
authorSteve Slaven <bpk@hoopajoo.net>2009-07-28 16:39:24 (GMT)
committerSteve Slaven <bpk@hoopajoo.net>2009-07-28 16:39:24 (GMT)
commitc2b70dc5dfa2437b4a9c0770e7d01abcbf2acbd5 (patch)
tree6344322f598c95f036a06cb589dfea55266121fe /fusearchive.py
parent67bfdae92465ba23b1a8140b329710773d2738b8 (diff)
downloadfusearchive-c2b70dc5dfa2437b4a9c0770e7d01abcbf2acbd5.zip
fusearchive-c2b70dc5dfa2437b4a9c0770e7d01abcbf2acbd5.tar.gz
fusearchive-c2b70dc5dfa2437b4a9c0770e7d01abcbf2acbd5.tar.bz2
Fixed log message and added log message for serialization
Diffstat (limited to 'fusearchive.py')
-rwxr-xr-xfusearchive.py9
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" )