[config] use hashlib to avoid warning w/ py2.6 stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 05 Jul 2010 17:02:39 +0200
branchstable
changeset 5885 5d908f1a7659
parent 5884 a0eb685dfe7a
child 5886 00a78298d30d
[config] use hashlib to avoid warning w/ py2.6
cwconfig.py
--- a/cwconfig.py	Mon Jul 05 17:02:11 2010 +0200
+++ b/cwconfig.py	Mon Jul 05 17:02:39 2010 +0200
@@ -131,6 +131,7 @@
 
    Directory where pid files will be written
 """
+
 __docformat__ = "restructuredtext en"
 _ = unicode
 
@@ -987,12 +988,12 @@
 
     @cached
     def instance_md5_version(self):
-        import md5
+        import hashlib
         infos = []
         for pkg in self.cubes():
             version = self.cube_version(pkg)
             infos.append('%s-%s' % (pkg, version))
-        return md5.new(';'.join(infos)).hexdigest()
+        return hashlib.md5(';'.join(infos)).hexdigest()
 
     def load_configuration(self):
         """load instance's configuration files"""