summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xacprep11
1 files changed, 9 insertions, 2 deletions
diff --git a/acprep b/acprep
index 753f5986..ac009078 100755
--- a/acprep
+++ b/acprep
@@ -18,9 +18,13 @@ import shutil
import string
import sys
import time
-import hashlib
import tempfile
+try:
+ import hashlib
+except:
+ import md5
+
from os.path import *
from stat import *
from subprocess import Popen, PIPE, call
@@ -623,7 +627,10 @@ class PrepareBuild(CommandLineApp):
sys.exit(1)
fd = open(tarball)
- csum = hashlib.md5()
+ try:
+ csum = hashlib.md5()
+ except:
+ csum = md5.md5()
csum.update(fd.read())
fd.close()
digest = csum.hexdigest()