OSDN Git Service

[DO NOT MERGE] Update Security String to 2017-04-01 for mnc-dev am: 06a57496e6
[android-x86/build.git] / tools / merge-event-log-tags.py
index bddda90..64bad3f 100755 (executable)
@@ -26,7 +26,10 @@ and fails if they do.
 
 import cStringIO
 import getopt
-import md5
+try:
+  import hashlib
+except ImportError:
+  import md5 as hashlib
 import struct
 import sys
 
@@ -141,7 +144,7 @@ if warnings:
 # versions of python.  Using md5 is overkill here but is the same from
 # platform to platform and speed shouldn't matter in practice.
 def hashname(str):
-  d = md5.md5(str).digest()[:4]
+  d = hashlib.md5(str).digest()[:4]
   return struct.unpack("!I", d)[0]
 
 # Assign a tag number to all the entries that say they want one