aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Slaven <bpk@hoopajoo.net>2009-07-29 17:55:04 (GMT)
committerSteve Slaven <bpk@hoopajoo.net>2009-07-29 17:55:04 (GMT)
commitbb796538fc53ac6a40fd12df7594b5550157619f (patch)
tree0f07e9f0f329e1a06c38ef42ccea969e027d7647
parent423e41caee1a41257a147340e40897d52baf8a77 (diff)
downloadfusearchive-bb796538fc53ac6a40fd12df7594b5550157619f.zip
fusearchive-bb796538fc53ac6a40fd12df7594b5550157619f.tar.gz
fusearchive-bb796538fc53ac6a40fd12df7594b5550157619f.tar.bz2
Eliminated some more str() stuff
-rwxr-xr-xfusearchive.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/fusearchive.py b/fusearchive.py
index 26e4571..8e75ce1 100755
--- a/fusearchive.py
+++ b/fusearchive.py
@@ -24,7 +24,10 @@ fuse.fuse_python_api = (0, 2)
fuse.feature_assert('stateful_files', 'has_init')
-logging.basicConfig( level = logging.WARNING,
+log_level = logging.DEBUG
+#log_level = logging.WARNING
+
+logging.basicConfig( level = log_level,
format = '%(asctime)s %(levelname)s %(filename)s:%(lineno)d %(module)s:%(funcName)s() %(message)s',
stream = sys.stderr,
filemode = 'w' )
@@ -292,7 +295,7 @@ class FuseArchiveSerializer:
@staticmethod
def dumpfh( fh, obj ):
- logging.debug( "Going to serialize %s to %s" % ( str( obj ), str( fh ) ) )
+ logging.debug( "Going to serialize %s to %s" % ( obj, fh ) )
fh.truncate( 0 )
fh.seek( 0 )
f = gzip.GzipFile( None, "wb", gzip_compress_level, fh )
@@ -313,7 +316,7 @@ class FuseArchiveSerializer:
@staticmethod
def loadfh( fh ):
- logging.debug( "Going to load from " + str( fh ) )
+ logging.debug( "Going to load from %s" % fh )
fh.seek( 0 )
f = gzip.GzipFile( None, "rb", gzip_compress_level, fh )
#f = fh
@@ -528,11 +531,11 @@ class FuseArchive(Fuse):
if preexist:
# Read in file info table
- logging.debug( "Unpickling: " + str( self.file ) )
+ logging.debug( "Unpickling: %s" % self.file )
# TODO: return an IO error if inflating fails
try:
magic = FuseArchiveSerializer.loadfh( self.file )
- logging.debug( "Got data: " + str( magic ) )
+ logging.debug( "Got data: %s" % magic )
self.size = magic[ 'size' ]
self.chunks = magic[ 'chunks' ]
self.chunk_size = magic[ 'chunk_size' ]
@@ -547,7 +550,7 @@ class FuseArchive(Fuse):
self.direct_io = False
self.keep_cache = False
- logging.debug( str(self) + " init complete" )
+ logging.debug( "%s init complete" % self )
def _load_chunk( self, index ):
# If the current chunk is the same as the chunk we're loading