Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Network Health
Metrics
Onionperf
Commits
5c4c77bb
Commit
5c4c77bb
authored
Jul 09, 2020
by
Ana Custura
Browse files
Updates analysis version to 3.0
parent
ae18e7a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
onionperf/analysis.py
View file @
5c4c77bb
...
...
@@ -26,7 +26,7 @@ class OPAnalysis(Analysis):
def
__init__
(
self
,
nickname
=
None
,
ip_address
=
None
):
super
().
__init__
(
nickname
,
ip_address
)
self
.
json_db
=
{
'type'
:
'onionperf'
,
'version'
:
'2
.0'
,
'data'
:
{}}
self
.
json_db
=
{
'type'
:
'onionperf'
,
'version'
:
'3
.0'
,
'data'
:
{}}
self
.
torctl_filepaths
=
[]
def
add_torctl_file
(
self
,
filepath
):
...
...
@@ -113,7 +113,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'
])
>=
'
3
.'
:
elif
db
[
'type'
]
!=
'onionperf'
or
str
(
db
[
'version'
])
>=
'
4
.'
:
logging
.
warning
(
"type or version not supported (type={0}, version={1})"
.
format
(
db
[
'type'
],
db
[
'version'
]))
return
None
else
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment