From: Brian Warner Date: Thu, 1 Sep 2011 16:05:43 +0000 (-0700) Subject: improve the storage/mutable.py asserts even more X-Git-Tag: allmydata-tahoe-1.9.0a2~63 X-Git-Url: https://git.rkrishnan.org/FOOURL?a=commitdiff_plain;h=01b5124d0af5e6fe8aceead539f1f86f784e7533;p=tahoe-lafs%2Ftahoe-lafs.git improve the storage/mutable.py asserts even more --- diff --git a/src/allmydata/storage/mutable.py b/src/allmydata/storage/mutable.py index e21c41dd..447e6bcc 100644 --- a/src/allmydata/storage/mutable.py +++ b/src/allmydata/storage/mutable.py @@ -28,8 +28,10 @@ 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). +# The struct module doc says that L's are 4 bytes in size., and that Q's are +# 8 bytes in size. Since compatibility depends upon this, double-check it. +assert struct.calcsize(">L") == 4, struct.calcsize(">L") +assert struct.calcsize(">Q") == 8, struct.calcsize(">Q") class MutableShareFile: