summaryrefslogtreecommitdiffstats
path: root/pym/portage_checksum.py
diff options
context:
space:
mode:
Diffstat (limited to 'pym/portage_checksum.py')
-rw-r--r--pym/portage_checksum.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/pym/portage_checksum.py b/pym/portage_checksum.py
index 9f31e0f6c..0e3706e81 100644
--- a/pym/portage_checksum.py
+++ b/pym/portage_checksum.py
@@ -8,6 +8,7 @@ from portage_const import PRIVATE_PATH,PRELINK_BINARY,HASHING_BLOCKSIZE
import os
import shutil
import stat
+import portage_exception
import portage_exec
import portage_util
import portage_locks
@@ -142,5 +143,7 @@ def perform_checksum(filename, hash_function=md5hash, calc_prelink=0):
def perform_multiple_checksums(filename, hashes=["MD5"], calc_prelink=0):
rVal = {}
for x in hashes:
+ if x not in hashfunc_map:
+ raise portage_exception.DigestException, x+" hash function not available"
rVal[x] = perform_checksum(filename, hashfunc_map[x], calc_prelink)[0]
return rVal