From: Brian Warner Date: Mon, 16 Jun 2008 23:37:04 +0000 (-0700) Subject: web /statistics : show 0 instead of None for mutable files X-Git-Tag: allmydata-tahoe-1.2.0~88 X-Git-Url: https://git.rkrishnan.org/components/com_hotproperty/frontends?a=commitdiff_plain;h=166e68f2a3ee0b860c66e841b680de0994527822;p=tahoe-lafs%2Ftahoe-lafs.git web /statistics : show 0 instead of None for mutable files --- diff --git a/src/allmydata/web/status.py b/src/allmydata/web/status.py index 020be4a1..39a3e0f0 100644 --- a/src/allmydata/web/status.py +++ b/src/allmydata/web/status.py @@ -961,13 +961,13 @@ class Statistics(rend.Page): (files, bytes, abbreviate_size(bytes))) def render_publishes(self, ctx, data): - files = data["counters"].get("mutable.files_published") + files = data["counters"].get("mutable.files_published", 0) bytes = data["counters"].get("mutable.bytes_published", 0) return "%s files / %s bytes (%s)" % (files, bytes, abbreviate_size(bytes)) def render_retrieves(self, ctx, data): - files = data["counters"].get("mutable.files_retrieved") + files = data["counters"].get("mutable.files_retrieved", 0) bytes = data["counters"].get("mutable.bytes_retrieved", 0) return "%s files / %s bytes (%s)" % (files, bytes, abbreviate_size(bytes))