git » abk » commit 79b51b9

Whitespace cleanups.

author
2005-03-02 18:44:55 UTC
committer
2005-03-02 18:44:55 UTC
parent d3e28229b9ce369fb05151a986fd36f56a0a2630

Whitespace cleanups.

abk +3 -26

diff --git a/abk b/abk
index ddca6de..1570354 100644
--- a/abk
+++ b/abk
@@ -68,7 +68,7 @@ class file_info:
 		self.mode = s.st_mode
 		self.uid = s.st_uid
 		self.gid = s.st_gid
-		
+
 		# FIXME: hacer opcional para Damian
 		if self.type == 'r':
 			self.hash = self.hash_file()
@@ -105,7 +105,6 @@ class file_info:
 	def __ne__(self, other):
 		return not (self == other)
 
-
 	def UNUSED_copy_file_reg(self, dst):
 		"Copy a regular file."
 		sfile = open(self.name, 'r')
@@ -195,7 +194,6 @@ class file_info:
 		return hash.hexdigest()
 
 
-
 class index_file:
 	"Represents the index file."
 	def __init__(self, name):
@@ -228,10 +226,6 @@ class index_file:
 	def get_file(self, filename):
 		"Get the file_info object for the given filename."
 		return self.db[filename]
-	
-	def UNUSED_del_file(self, filename):
-		"Remove a file from the index."
-		del(self.db[filename])
 
 	def populate(self, root):
 		"Populate the index from a root path."
@@ -246,24 +240,6 @@ class index_file:
 				self.put_file(name)
 
 
-def UNUSED_bz2_file(src, dst = None):
-	"Compress a file using bz2."
-	if not dst:
-		dst = src + '.bz2'
-
-	sfile = open(src)
-	dfile = open(dst, 'w')
-
-	bcomp = bz2.BZ2Compressor()
-	data = sfile.read(PSIZE)
-	while data:
-		dfile.write(bcomp.compress(data))
-		data = sfile.read(PSIZE)
-	dfile.write(bcomp.flush())
-	sfile.close()
-	dfile.close()
-
-
 def quiet_unlink(path):
 	"Removes the given file if exists, or do nothing if not."
 	try:
@@ -294,6 +270,7 @@ def make_path(f):
 		# it can fail if already exist
 		pass
 
+
 #
 # main
 #
@@ -326,7 +303,7 @@ for f in srcidx.names:
 		# metadata changed
 		dst = os.path.join(dst_path, f)
 		updated_files.append((f, dst))
-		
+
 for f in dstidx.names:
 	if f not in srcidx.names:
 		# files in destination and not in source