From 166e68f2a3ee0b860c66e841b680de0994527822 Mon Sep 17 00:00:00 2001 From: Brian Warner <warner@allmydata.com> Date: Mon, 16 Jun 2008 16:37:04 -0700 Subject: [PATCH] web /statistics : show 0 instead of None for mutable files --- src/allmydata/web/status.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)) -- 2.45.2