[zopeorg-checkins] CVS: Products/ZopeOrg-NV - __init__.py:1.39

Chris McDonough chrism at zope.com
Thu Oct 2 13:38:23 EDT 2003


Update of /cvs-zopeorg/Products/ZopeOrg-NV
In directory cvs.zope.org:/tmp/cvs-serv12545

Modified Files:
	__init__.py 
Log Message:
Dont monkey patch CMFPackage (we're now using a vendor import of CMFPackage which has the MD5 bug and the setting of creation_date in releases fixed).


=== Products/ZopeOrg-NV/__init__.py 1.38 => 1.39 ===
 
 # Hack to fix MD5 sums for CMFPackage SW release files. This really
 # should go back into that product, once the owner is identified.
-import md5
+# XXX - patches integrated into CMFPackage on zope.org
+# import md5
 
-def _calculateMD5(self):
-    """monkey patch"""
-    body = str(self)
-    hash = md5.new(body).digest()
-    func = lambda x: '%0.2x' % ord(x)
-    self._md5 = ''.join(map(func, hash))
-    self._md5_ok = 1
+## def _calculateMD5(self):
+##     """monkey patch"""
+##     body = str(self)
+##     hash = md5.new(body).digest()
+##     func = lambda x: '%0.2x' % ord(x)
+##     self._md5 = ''.join(map(func, hash))
+##     self._md5_ok = 1
 
-def MD5(self, RESPONSE=None):
-    """monkey patch"""
-    # temp hack
-    if not getattr(self, '_md5_ok', 0):
-        return ''
-    return getattr(aq_base(self), '_md5', '')
+## def MD5(self, RESPONSE=None):
+##     """monkey patch"""
+##     # temp hack
+##     if not getattr(self, '_md5_ok', 0):
+##         return ''
+##     return getattr(aq_base(self), '_md5', '')
 
 
-from Products.CMFPackage.SoftwareReleaseFile import SoftwareReleaseFile
-SoftwareReleaseFile._calculateMD5 = _calculateMD5
-SoftwareReleaseFile.MD5 = MD5
+## from Products.CMFPackage.SoftwareReleaseFile import SoftwareReleaseFile
+## SoftwareReleaseFile._calculateMD5 = _calculateMD5
+## SoftwareReleaseFile.MD5 = MD5
 
 
 





More information about the zopeorg-checkins mailing list