Skip to content
GitLab
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
sbws
Commits
09010c5d
Commit
09010c5d
authored
Apr 26, 2018
by
Matt Traudt
Browse files
Make linter happy, replace time_now with time.time
parent
735ef19d
Changes
2
Hide whitespace changes
Inline
Side-by-side
sbws/core/generate.py
View file @
09010c5d
from
sbws
import
version
from
sbws.globals
import
(
fail_hard
,
is_initted
)
from
sbws.globals
import
(
fail_hard
,
is_initted
)
from
sbws.lib.v3bwfile
import
V3BwHeader
from
sbws.lib.v3bwfile
import
V3BwHeader
from
sbws.lib.resultdump
import
ResultSuccess
from
sbws.lib.resultdump
import
ResultSuccess
...
@@ -7,7 +6,6 @@ from sbws.lib.resultdump import group_results_by_relay
...
@@ -7,7 +6,6 @@ from sbws.lib.resultdump import group_results_by_relay
from
argparse
import
ArgumentDefaultsHelpFormatter
from
argparse
import
ArgumentDefaultsHelpFormatter
from
statistics
import
median
from
statistics
import
median
import
os
import
os
import
time
import
logging
import
logging
log
=
logging
.
getLogger
(
__name__
)
log
=
logging
.
getLogger
(
__name__
)
...
...
sbws/lib/v3bwfile.py
View file @
09010c5d
...
@@ -2,9 +2,10 @@
...
@@ -2,9 +2,10 @@
"""Classes and functions that create the bandwidth measurements document
"""Classes and functions that create the bandwidth measurements document
(v3bw) used by bandwidth authorities."""
(v3bw) used by bandwidth authorities."""
import
time
import
logging
import
logging
from
sbws
import
version
from
sbws
import
version
from
sbws.globals
import
time_now
,
SPEC_VERSION
from
sbws.globals
import
SPEC_VERSION
log
=
logging
.
getLogger
(
__name__
)
log
=
logging
.
getLogger
(
__name__
)
...
@@ -22,7 +23,7 @@ class V3BwHeader(object):
...
@@ -22,7 +23,7 @@ class V3BwHeader(object):
"""
"""
def
__init__
(
self
,
timestamp
=
None
,
version
=
SPEC_VERSION
,
software
=
'sbws'
,
def
__init__
(
self
,
timestamp
=
None
,
version
=
SPEC_VERSION
,
software
=
'sbws'
,
software_version
=
version
):
software_version
=
version
):
self
.
timestamp
=
timestamp
or
int
(
time
_now
())
self
.
timestamp
=
timestamp
or
int
(
time
.
time
())
self
.
version
=
version
self
.
version
=
version
self
.
software
=
software
self
.
software
=
software
self
.
software_version
=
software_version
self
.
software_version
=
software_version
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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