]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
dump-share: clarify the label on the size of the original file
authorBrian Warner <warner@allmydata.com>
Wed, 26 Sep 2007 22:00:59 +0000 (15:00 -0700)
committerBrian Warner <warner@allmydata.com>
Wed, 26 Sep 2007 22:00:59 +0000 (15:00 -0700)
src/allmydata/scripts/debug.py

index 15b810c12edb3834fce0ce67638d139cbec5a235..63b212ff778a62a73b32fcee4e779ae56d51aaa7 100644 (file)
@@ -61,17 +61,21 @@ def dump_share(config, out=sys.stdout, err=sys.stderr):
     keys3 = ("plaintext_hash", "plaintext_root_hash",
              "crypttext_hash", "crypttext_root_hash",
              "share_root_hash")
+    display_keys = {"size": "file_size"}
     for k in keys1:
         if k in unpacked:
-            print >>out, "%19s: %s" % (k, unpacked[k])
+            dk = display_keys.get(k, k)
+            print >>out, "%19s: %s" % (dk, unpacked[k])
     print >>out
     for k in keys2:
         if k in unpacked:
-            print >>out, "%19s: %s" % (k, unpacked[k])
+            dk = display_keys.get(k, k)
+            print >>out, "%19s: %s" % (dk, unpacked[k])
     print >>out
     for k in keys3:
         if k in unpacked:
-            print >>out, "%19s: %s" % (k, unpacked[k])
+            dk = display_keys.get(k, k)
+            print >>out, "%19s: %s" % (dk, unpacked[k])
 
     leftover = set(unpacked.keys()) - set(keys1 + keys2 + keys3)
     if leftover: