From 9c505e49c25facf3503ad20e5029e4db55151ed9 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Thu, 2 Oct 2008 17:27:49 -0700 Subject: [PATCH] stop using 'as' as an identifier: as with 'with', 'as' has become a reserved word in python 2.6 --- src/allmydata/immutable/upload.py | 9 ++++----- src/allmydata/test/test_base62.py | 6 +++--- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/allmydata/immutable/upload.py b/src/allmydata/immutable/upload.py index 2f641922..cf275b89 100644 --- a/src/allmydata/immutable/upload.py +++ b/src/allmydata/immutable/upload.py @@ -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 diff --git a/src/allmydata/test/test_base62.py b/src/allmydata/test/test_base62.py index 83fb7402..2882b5b3 100644 --- a/src/allmydata/test/test_base62.py +++ b/src/allmydata/test/test_base62.py @@ -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) -- 2.45.2