r312 - branches/rewrite/src
Marco Presi
partial-mirror-devel@lists.alioth.debian.org
Sun, 14 Nov 2004 08:52:30 -0700
Author: zufus
Date: Sun Nov 14 08:52:29 2004
New Revision: 312
Modified:
branches/rewrite/src/Dists.py
branches/rewrite/src/FileSystem.py
Log:
Small fixies
Modified: branches/rewrite/src/Dists.py
==============================================================================
--- branches/rewrite/src/Dists.py (original)
+++ branches/rewrite/src/Dists.py Sun Nov 14 08:52:29 2004
@@ -58,12 +58,6 @@
% (self._backend["mirror_dir"] + self._backend["name"], d, c)
self.__files.append((server, filename))
-
- def __updateBackendPkgList(self):
- """Update Package List of this Backend"""
- print "Warning! updateBackendPkgList not complete!!\n"
- pass
-
def create (self):
""" Get all files """
for f in self.__files:
Modified: branches/rewrite/src/FileSystem.py
==============================================================================
--- branches/rewrite/src/FileSystem.py (original)
+++ branches/rewrite/src/FileSystem.py Sun Nov 14 08:52:29 2004
@@ -73,10 +73,10 @@
""" Return FileSystem path """
return (self._dir)
- def md5_on (self, file):
+ def md5_on (self, f):
"""Sum files"""
try:
- file_to_hash = file(os.path.join(self._dir, file), 'r')
+ file_to_hash = open(os.path.join(self._dir, f), 'r')
except IOError, msg:
print msg
return -1
@@ -84,7 +84,7 @@
md5hash = md5.new()
md5hash.update(file_to_hash.read())
file_to_hash.close()
- return md5
+ return md5hash.hexdigest()
def uncompress (self, f):
"""Uncompress a file"""