git://git.novaco.in
/
p2pool.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
5cde217
)
fixed 5cde217 causing assertion failures in debug mode
author
Forrest Voight
<forrest@forre.st>
Thu, 27 Jun 2013 17:02:25 +0000 (13:02 -0400)
committer
Forrest Voight
<forrest@forre.st>
Thu, 27 Jun 2013 17:02:38 +0000 (13:02 -0400)
p2pool/util/pack.py
patch
|
blob
|
history
diff --git
a/p2pool/util/pack.py
b/p2pool/util/pack.py
index
1ed2629
..
b2fd6da
100644
(file)
--- a/
p2pool/util/pack.py
+++ b/
p2pool/util/pack.py
@@
-63,7
+63,9
@@
class Type(object):
obj = self._unpack(data, ignore_trailing)
if p2pool.DEBUG:
- if self._pack(obj) != data:
+ packed = self._pack(obj)
+ good = data.startswith(packed) if ignore_trailing else data == packed
+ if not good:
raise AssertionError()
return obj