diff options
Diffstat (limited to 'pym/portage/util/whirlpool.py')
-rw-r--r-- | pym/portage/util/whirlpool.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pym/portage/util/whirlpool.py b/pym/portage/util/whirlpool.py index c696f6fc0..170ae73f8 100644 --- a/pym/portage/util/whirlpool.py +++ b/pym/portage/util/whirlpool.py @@ -639,6 +639,8 @@ def WhirlpoolInit(ctx): return def WhirlpoolAdd(source, sourceBits, ctx): + if not isinstance(source, bytes): + raise TypeError("Expected %s, got %s" % (bytes, type(source))) if sys.hexversion < 0x3000000: source = [ord(s)&0xff for s in source] |