]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
stop using 'as' as an identifier: as with 'with', 'as' has become a reserved word...
authorBrian Warner <warner@allmydata.com>
Fri, 3 Oct 2008 00:27:49 +0000 (17:27 -0700)
committerBrian Warner <warner@allmydata.com>
Fri, 3 Oct 2008 00:27:49 +0000 (17:27 -0700)
src/allmydata/immutable/upload.py
src/allmydata/test/test_base62.py

index 2f6419228e0f654c32394e9b9d70845c4169cea3..cf275b899b1c6f4a78f48f01d79cfb76f7c1ce86 100644 (file)
@@ -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
index 83fb7402386c922f008c17302a1eef581fe2da1a..2882b5b3ab478235ea5368fcb8db6ad703d3b433 100644 (file)
@@ -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)