diff --git a/src/bundle_combine.py b/src/bundle_combine.py index ce10cb2..131a9ab 100755 --- a/src/bundle_combine.py +++ b/src/bundle_combine.py @@ -23,6 +23,8 @@ def get_parent_domain(subdomain): parts = subdomain.split('.') if len(parts) < 3: return subdomain + elif parts[-1].isdigit(): + return subdomain # ip address elif dom_in_3rd_domain(parts[-1] + '.' + parts[-2]): return '.'.join(parts[-3:]) else: diff --git a/src/html_bundle.py b/src/html_bundle.py index dd7de72..dd3247a 100755 --- a/src/html_bundle.py +++ b/src/html_bundle.py @@ -14,6 +14,10 @@ def seconds_to_time(seconds): return '{:02d}:{:02d}:{:02d}'.format(hours, minutes, seconds) +def round_num(num): + return format(num, '.1f') # .rstrip('0').rstrip('.') + + def gen_dotgraph(sorted_arr): txt = '' for name, count, mark in sorted_arr: @@ -94,10 +98,10 @@ def gen_html(bundle_id, obj):