From: wilcoxjg Date: Thu, 1 Sep 2011 08:41:44 +0000 (-0700) Subject: storage/mutable.py: special characters in struct.foo arguments indicate standard... X-Git-Tag: allmydata-tahoe-1.9.0a2~64 X-Git-Url: https://git.rkrishnan.org/pf/content//%22%3C?a=commitdiff_plain;h=d2e5de3b6913082faa349e3fe774323b47df4fe4;p=tahoe-lafs%2Ftahoe-lafs.git storage/mutable.py: special characters in struct.foo arguments indicate standard as opposed to native sizes, we should be using these characters in these asserts --- diff --git a/src/allmydata/storage/mutable.py b/src/allmydata/storage/mutable.py index 6282af59..e21c41dd 100644 --- a/src/allmydata/storage/mutable.py +++ b/src/allmydata/storage/mutable.py @@ -28,8 +28,8 @@ from allmydata.storage.common import UnknownMutableContainerVersionError, \ # 9 ?? n*92 extra leases -assert struct.calcsize("L"), 4 # The struct module doc says that L's are 4 bytes in size. -assert struct.calcsize("Q"), 8 # The struct module doc says that Q's are 8 bytes in size (at least with big-endian ordering). +assert struct.calcsize(">L") == 4 # The struct module doc says that L's are 4 bytes in size. +assert struct.calcsize(">Q") == 8 # The struct module doc says that Q's are 8 bytes in size (at least with big-endian ordering). class MutableShareFile: