summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_html_indexes.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/bin/reproducible_html_indexes.py b/bin/reproducible_html_indexes.py
index 9847781a..a0f18fab 100755
--- a/bin/reproducible_html_indexes.py
+++ b/bin/reproducible_html_indexes.py
@@ -240,8 +240,13 @@ pages = {
def build_leading_text_section(section, rows):
html = '<p>\n' + tab
total = len(rows)
- percent = round(((total/count_total)*100), 1) # count_total is
- try: # defined in common
+ try:
+ percent = round(((total/count_total)*100), 1) # count_total is
+ except ZeroDivisionError: # defined in common
+ log.error('Looks like there are either no tested package or no ' + \
+ 'packages available at all. Maybe it\'s a new database?')
+ percent = 0.0
+ try:
html += '<a href="' + section['icon_link'] + '" target="_parent">'
no_icon_link = False
except KeyError: