diff options
| author | doko <doko@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-23 14:25:33 +0000 |
|---|---|---|
| committer | doko <doko@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-23 14:25:33 +0000 |
| commit | d2bb4bcb06fc3a590d434a51d4e6fd100e466678 (patch) | |
| tree | 178c970a137f6376c37bd7319cfd7ed44950b4c5 /libjava | |
| parent | b0e684c847dae0269be7dcc39181e1adaeed1e6a (diff) | |
| download | ppe42-gcc-d2bb4bcb06fc3a590d434a51d4e6fd100e466678.tar.gz ppe42-gcc-d2bb4bcb06fc3a590d434a51d4e6fd100e466678.zip | |
2009-07-23 Matthias Klose <doko@ubuntu.com>
* 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
Diffstat (limited to 'libjava')
| -rw-r--r-- | libjava/ChangeLog | 4 | ||||
| -rw-r--r-- | libjava/contrib/aotcompile.py.in | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index d838e26fabe..3afbd632a2b 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,7 @@ +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 diff --git a/libjava/contrib/aotcompile.py.in b/libjava/contrib/aotcompile.py.in index 9db08d2b59c..17a2dd68ea8 100644 --- a/libjava/contrib/aotcompile.py.in +++ b/libjava/contrib/aotcompile.py.in @@ -15,7 +15,11 @@ 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 @@ -182,7 +186,7 @@ class Job: 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 |

