]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Change code that gives a base32 SI or an empty string to be more straightforward...
authordavid-sarah <david-sarah@jacaranda.org>
Sat, 27 Feb 2010 06:55:51 +0000 (22:55 -0800)
committerdavid-sarah <david-sarah@jacaranda.org>
Sat, 27 Feb 2010 06:55:51 +0000 (22:55 -0800)
src/allmydata/dirnode.py
src/allmydata/web/directory.py

index dc268f654ab22488f1227f85d1dc9c62c6a5b653..fca772b9c6ef552f7c5bc8d79d33cd7bb99fecbe 100644 (file)
@@ -830,9 +830,13 @@ class ManifestWalker(DeepStats):
 class DeepChecker:
     def __init__(self, root, verify, repair, add_lease):
         root_si = root.get_storage_index()
+        if root_si:
+            root_si_base32 = base32.b2a(root_si)
+        else:
+            root_si_base32 = ""
         self._lp = log.msg(format="deep-check starting (%(si)s),"
                            " verify=%(verify)s, repair=%(repair)s",
-                           si=base32.b2a(root_si or ""), verify=verify, repair=repair)
+                           si=root_si_base32, verify=verify, repair=repair)
         self._verify = verify
         self._repair = repair
         self._add_lease = add_lease
index d83def2261019d0c113f6221fc65678fae87a378..f01cd1d7f519c82b57e53cb67967931052fab765 100644 (file)
@@ -923,9 +923,13 @@ class ManifestResults(rend.Page, ReloadMixin):
         m = self.monitor
         s = m.get_status()
 
+        if m.origin_si:
+            origin_base32 = base32.b2a(m.origin_si)
+        else:
+            origin_base32 = ""
         status = { "stats": s["stats"],
                    "finished": m.is_finished(),
-                   "origin": base32.b2a(m.origin_si or ""),
+                   "origin": origin_base32,
                    }
         if m.is_finished():
             # don't return manifest/verifycaps/SIs unless the operation is