aboutsummaryrefslogtreecommitdiffstats
path: root/dump_chunkfile.py
diff options
context:
space:
mode:
Diffstat (limited to 'dump_chunkfile.py')
-rwxr-xr-xdump_chunkfile.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/dump_chunkfile.py b/dump_chunkfile.py
index 84fbfac..64b1af9 100755
--- a/dump_chunkfile.py
+++ b/dump_chunkfile.py
@@ -1,6 +1,13 @@
#!/usr/bin/env python
-import FuseArchive.ChunkFile, sys, re, os
+import FuseArchive.ChunkFile, sys, re, os, logging
+
+#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' )
# Run this in the storage area, basically 'cat' the file
file = re.sub( '^.*?tree', '', sys.argv[ 1 ] )
@@ -9,6 +16,7 @@ sys.stderr.write( "Opening file: %s\n" % file )
f = FuseArchive.ChunkFile.ChunkFile( file, os.O_RDONLY, 0 )
sys.stderr.write( "File is: %d bytes\n" % f.size )
+sys.stderr.write( "File has %d chunks\n" % len( f.chunks ) )
offset = 0
blocksize = 4096