GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

Commit d0660c18 authored by Ana Custura's avatar Ana Custura

Bump analysis version to 4.0

parent a466221c
......@@ -24,7 +24,7 @@ class OPAnalysis(Analysis):
def __init__(self, nickname=None, ip_address=None):
super().__init__(nickname, ip_address)
self.json_db = {'type': 'onionperf', 'version': '3.0', 'data': {}}
self.json_db = {'type': 'onionperf', 'version': '4.0', 'data': {}}
self.torctl_filepaths = []
def add_torctl_file(self, filepath):
......@@ -133,7 +133,7 @@ class OPAnalysis(Analysis):
if 'type' not in db or 'version' not in db:
logging.warning("'type' or 'version' not present in database")
return None
elif db['type'] != 'onionperf' or str(db['version']) >= '4.':
elif db['type'] != 'onionperf' or str(db['version']) >= '5.':
logging.warning("type or version not supported (type={0}, version={1})".format(db['type'], db['version']))
return None
else:
......
......@@ -71,6 +71,7 @@ class Filtering(object):
self.analysis = OPAnalysis.load(filename=input_path)
self.filter_tor_circuits(self.analysis)
self.analysis.json_db["filters"] = self.filters
self.analysis.json_db["version"] = '4.0'
self.analysis.json_db = dict(sorted(self.analysis.json_db.items()))
self.analysis.save(filename=output_file, output_prefix=output_dir, sort_keys=False)
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