Commit d38b5063 authored by Jérome Perrin's avatar Jérome Perrin

monitor/build_statistic: support python3

parent 91e7b559
Pipeline #27335 failed with stage
in 0 seconds
...@@ -5,6 +5,8 @@ import time ...@@ -5,6 +5,8 @@ import time
import os import os
import argparse import argparse
import six
def parseArguments(): def parseArguments():
""" """
Parse arguments for monitor statistics. Parse arguments for monitor statistics.
...@@ -52,7 +54,7 @@ def buildStatistic(history_folder): ...@@ -52,7 +54,7 @@ def buildStatistic(history_folder):
result[day][str(entry["status"])] += 1 result[day][str(entry["status"])] += 1
f.close() f.close()
for date, stat in result.iteritems(): for date, stat in six.iteritems(result):
stats_list.append( stats_list.append(
{"status": "ERROR" if stat["ERROR"] > 0 else "OK", {"status": "ERROR" if stat["ERROR"] > 0 else "OK",
"change-time": now, "change-time": now,
......
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