summaryrefslogtreecommitdiff
path: root/webapp.py
diff options
context:
space:
mode:
Diffstat (limited to 'webapp.py')
-rwxr-xr-xwebapp.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/webapp.py b/webapp.py
index fdf8704..18a65be 100755
--- a/webapp.py
+++ b/webapp.py
@@ -256,11 +256,13 @@ class Application(object):
row = conn.execute("SELECT count(filename), sum(size) FROM content WHERE package = ?;",
(package,)).fetchone()
num_files, total_size = row
+ if total_size is None:
+ total_size = 0
return dict(package=package,
version=version,
architecture=architecture,
num_files=num_files,
- total_size=total_size and 0) # total_size may be None
+ total_size=total_size)
def get_dependencies(self, package):
with self.db.begin() as conn: