Fix `var not defined' bug introduced in 31231dee4f
authorNikos Skalkotos <skalkoto@grnet.gr>
Tue, 24 Apr 2012 10:42:57 +0000 (13:42 +0300)
committerGiorgos Verigakis <verigak@gmail.com>
Wed, 9 May 2012 10:18:51 +0000 (13:18 +0300)
kamaki/clients/pithos.py

index 4fe7926..9698631 100644 (file)
@@ -82,7 +82,7 @@ class PithosClient(StorageClient):
         blockhash = meta['block-hash']
 
         size = size if size is not None else os.fstat(f.fileno()).st_size
-        nblocks = 1 + (file_size - 1) // blocksize
+        nblocks = 1 + (size - 1) // blocksize
         hashes = []
         map = {}