* contrib/aotcompile.py.in: Use hashlib instead of md5 if available.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150010
138bc75d-0d04-0410-961f-
82ee72b054a4
+2009-07-23 Matthias Klose <doko@ubuntu.com>
+
+ * contrib/aotcompile.py.in: Use hashlib instead of md5 if available.
+
2009-07-17 Joseph Myers <joseph@codesourcery.com>
PR other/40784
import classfile
import copy
-import md5
+# The md5 module is deprecated in Python 2.5
+try:
+ from hashlib import md5
+except ImportError:
+ from md5 import md5
import operator
import os
import sys
def addClass(self, bytes, name):
"""Subclasses call this from their __init__ method for
every class they find."""
- digest = md5.new(bytes).digest()
+ digest = md5(bytes).digest()
self.classes[digest] = bytes
self.classnames[digest] = name