mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-24 07:06:41 +00:00
stop using 'as' as an identifier: as with 'with', 'as' has become a reserved word in python 2.6
This commit is contained in:
parent
034364c80b
commit
9c505e49c2
@ -76,11 +76,10 @@ class PeerTracker:
|
||||
self._storageserver = storage_server # to an RIStorageServer
|
||||
self.buckets = {} # k: shareid, v: IRemoteBucketWriter
|
||||
self.sharesize = sharesize
|
||||
as = storage.allocated_size(sharesize,
|
||||
num_segments,
|
||||
num_share_hashes,
|
||||
EXTENSION_SIZE)
|
||||
self.allocated_size = as
|
||||
self.allocated_size = storage.allocated_size(sharesize,
|
||||
num_segments,
|
||||
num_share_hashes,
|
||||
EXTENSION_SIZE)
|
||||
|
||||
self.blocksize = blocksize
|
||||
self.num_segments = num_segments
|
||||
|
@ -18,9 +18,9 @@ class T(unittest.TestCase):
|
||||
assert base62.num_octets_that_encode_to_this_many_chars(chars) == octets, "%s != %s <- %s" % (octets, base62.num_octets_that_encode_to_this_many_chars(chars), chars)
|
||||
|
||||
def _test_ende(self, bs):
|
||||
as=base62.b2a(bs)
|
||||
bs2=base62.a2b(as)
|
||||
assert bs2 == bs, "bs2: %s:%s, bs: %s:%s, as: %s:%s" % (len(bs2), `bs2`, len(bs), `bs`, len(as), `as`)
|
||||
ascii=base62.b2a(bs)
|
||||
bs2=base62.a2b(ascii)
|
||||
assert bs2 == bs, "bs2: %s:%s, bs: %s:%s, ascii: %s:%s" % (len(bs2), `bs2`, len(bs), `bs`, len(ascii), `ascii`)
|
||||
|
||||
def test_num_octets_that_encode_to_this_many_chars(self):
|
||||
return self._test_num_octets_that_encode_to_this_many_chars(2, 1)
|
||||
|
Loading…
Reference in New Issue
Block a user