Commit 58e82c25 authored by Vincent Pelletier's avatar Vincent Pelletier

Store default match as None.

For future serialisation support flexibility.
parent 64dcab76
......@@ -634,7 +634,7 @@ period_parser = {
),
}
def asHTML(out, per_site, args, period_parameter_dict, stats):
def asHTML(out, per_site, args, default_site, period_parameter_dict, stats):
period = period_parameter_dict['period']
decimator = period_parameter_dict['decimator']
date_format = period_parameter_dict['date_format']
......@@ -678,6 +678,8 @@ def asHTML(out, per_site, args, period_parameter_dict, stats):
out.write('<tr><td>%s</td><td>%s</td></tr>' % (date, hit))
out.write('</table>')
for site_id, data in per_site.iteritems():
if site_id is None:
site_id = default_site
out.write('<h1>Site: %s</h1>' % site_id)
out.write(
graphPair(
......@@ -895,7 +897,7 @@ def main():
if prefix_match(url) is not None:
break
else:
site = default_site
site = None
action = default_action
if action is None:
skipped_lines += 1
......@@ -939,7 +941,7 @@ def main():
else:
out = open(args.out, 'w')
with out:
format_generator[args.format](out, per_site, args, {
format_generator[args.format](out, per_site, args, default_site, {
'period': period,
'decimator': decimator,
'date_format': date_format,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment