aboutsummaryrefslogtreecommitdiffstats
path: root/fusearchive.py
diff options
context:
space:
mode:
Diffstat (limited to 'fusearchive.py')
-rwxr-xr-xfusearchive.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/fusearchive.py b/fusearchive.py
index 8e75ce1..bd0d843 100755
--- a/fusearchive.py
+++ b/fusearchive.py
@@ -24,8 +24,8 @@ fuse.fuse_python_api = (0, 2)
fuse.feature_assert('stateful_files', 'has_init')
-log_level = logging.DEBUG
-#log_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',
@@ -123,7 +123,7 @@ def _save_chunk_fs( chunk ):
# Find a chunk slot
sub = 0
while True:
- checkpath = "./storage/" + subpath + "/" + hexdigest + "_" + str( sub )
+ checkpath = "./storage/%s/%s_%d" % ( subpath, hexdigest, sub )
logging.debug( "Checking: " + checkpath )
if os.path.exists( checkpath ):
# Check if this is our data
@@ -184,7 +184,7 @@ def _save_chunk_zip( chunk ):
# Find a chunk slot
sub = 0
while True:
- checkpath = hexdigest + "_" + str( sub )
+ checkpath = "%s_%d" % ( hexdigest, sub )
logging.debug( "Checking: " + checkpath )
try:
data = z.read( checkpath )
@@ -226,7 +226,7 @@ def _load_chunk_fs( key ):
subpath = '/'.join( subparts )
logging.debug( "Subpath: " + subpath )
- subpath += "/" + hexdigest + "_" + str( seq )
+ subpath += "/%s_%d" % ( hexdigest, seq )
logging.debug( "Chunk path: " + subpath )
@@ -260,7 +260,7 @@ def _load_chunk_zip( key ):
logging.debug( "Zip name: " + zipname )
z = zipfile.ZipFile( "./storage/" + zipname, 'r', zipfile.ZIP_DEFLATED, True )
- subpath = hexdigest + "_" + str( seq )
+ subpath = "%s_%d" % ( hexdigest, seq )
logging.debug( "Chunk path: " + subpath )
data = z.read( subpath )
if len( data ):