projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d9c77ee
)
WhirlpoolAdd: raise TypeError if not bytes
author
Zac Medico
<zmedico@gentoo.org>
Sat, 4 Aug 2012 19:26:25 +0000
(12:26 -0700)
committer
Zac Medico
<zmedico@gentoo.org>
Sat, 4 Aug 2012 19:26:25 +0000
(12:26 -0700)
pym/portage/util/whirlpool.py
patch
|
blob
|
history
diff --git
a/pym/portage/util/whirlpool.py
b/pym/portage/util/whirlpool.py
index c696f6fc009fbf50a5efa74f4d6627587a388fad..170ae73f804ee15b571debd276092d60562b77e9 100644
(file)
--- 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]