summaryrefslogtreecommitdiff
path: root/webapp.py
diff options
context:
space:
mode:
Diffstat (limited to 'webapp.py')
-rwxr-xr-xwebapp.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/webapp.py b/webapp.py
index 1da987b..dc439a1 100755
--- a/webapp.py
+++ b/webapp.py
@@ -21,7 +21,6 @@ hash_functions = [
jinjaenv = jinja2.Environment(loader=jinja2.FileSystemLoader("."))
def format_size(size):
- assert isinstance(size, int)
size = float(size)
fmt = "%d B"
if size >= 1024:
@@ -241,7 +240,7 @@ class Application(object):
details = dict(package=package,
version=version,
architecture=architecture)
- cur.execute("SELECT count(filename), sum(size) FROM content WHERE package = ?;",
+ cur.execute("SELECT count(filename), sum(size) FROM content WHERE package = ? AND function = 'sha512';",
(package,))
num_files, total_size = cur.fetchone()
details.update(dict(num_files=num_files, total_size=total_size))