aboutsummaryrefslogtreecommitdiffstats
path: root/fusearchive.py
diff options
context:
space:
mode:
authorSteve Slaven <bpk@hoopajoo.net>2009-07-29 17:58:14 (GMT)
committerSteve Slaven <bpk@hoopajoo.net>2009-07-29 17:58:14 (GMT)
commitc73b1bfa6b1de28934f93dd2a773a67f647b7824 (patch)
tree6063cf9f3868f7eba3e894aed1c41db41528b53d /fusearchive.py
parentbb796538fc53ac6a40fd12df7594b5550157619f (diff)
downloadfusearchive-before-class-split.zip
fusearchive-before-class-split.tar.gz
fusearchive-before-class-split.tar.bz2
Use some more printf like % stuff instead of str()before-class-split
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 ):