diff options
author | Helmut Grohne <helmut@subdivi.de> | 2013-04-25 14:19:58 +0200 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2013-04-25 14:19:58 +0200 |
commit | 2e26dee08a3f4c7ad3f41c7b523f58cc61a1c8b1 (patch) | |
tree | 820fbbca0f52907807e1048b116b452a648bd385 | |
parent | 5b14ad05b992327464e030fa3bae2a66a0bf7b63 (diff) | |
download | debian-dedup-2e26dee08a3f4c7ad3f41c7b523f58cc61a1c8b1.tar.gz |
webapp: total_size is None if num_files is 0
-rwxr-xr-x | webapp.py | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -253,6 +253,8 @@ class Application(object): cur.execute("SELECT count(filename), sum(size) FROM content WHERE package = ?;", (package,)) num_files, total_size = cur.fetchone() + if total_size is None: + total_size = 0 details.update(dict(num_files=num_files, total_size=total_size)) return details |