Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
doctor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Tor Project
Network Health
doctor
Commits
d86ad6b9
Unverified
Commit
d86ad6b9
authored
4 years ago
by
Georg Koppen
Browse files
Options
Downloads
Patches
Plain Diff
Bug 40012: Fix log.warn() deprecation in Python 3
parent
e660f097
No related branches found
Branches containing commit
No related tags found
1 merge request
!4
Bug 40012: Fix log.warn() deprecation in Python 3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
consensus_health_checker.py
+1
-1
1 addition, 1 deletion
consensus_health_checker.py
descriptor_checker.py
+3
-3
3 additions, 3 deletions
descriptor_checker.py
package_versions.py
+1
-1
1 addition, 1 deletion
package_versions.py
sybil_checker.py
+2
-2
2 additions, 2 deletions
sybil_checker.py
with
7 additions
and
7 deletions
consensus_health_checker.py
+
1
−
1
View file @
d86ad6b9
...
...
@@ -260,7 +260,7 @@ def main():
if
consensuses
and
votes
:
issues
+=
run_checks
(
consensuses
,
votes
)
else
:
log
.
warn
(
"
Unable to retrieve any votes. Skipping checks.
"
)
log
.
warn
ing
(
"
Unable to retrieve any votes. Skipping checks.
"
)
is_all_suppressed
=
True
# either no issues or they're all already suppressed
...
...
This diff is collapsed.
Click to expand it.
descriptor_checker.py
+
3
−
3
View file @
d86ad6b9
...
...
@@ -61,7 +61,7 @@ def main():
elif
"'
dirreq-v3-ips
'
line had non-ascii content
"
in
str
(
query
.
error
)
or
"
Entries in dirreq-v3-ips line should only be
"
in
str
(
query
.
error
):
log
.
debug
(
"
Suppressing error due to malformed dirreq-v3-ips line: https://trac.torproject.org/projects/tor/ticket/16858
"
)
else
:
log
.
warn
(
"
Unable to retrieve the %s: %s
"
%
(
descriptor_type
,
query
.
error
))
log
.
warn
ing
(
"
Unable to retrieve the %s: %s
"
%
(
descriptor_type
,
query
.
error
))
send_email
(
EMAIL_SUBJECT
,
descriptor_type
,
query
)
# download the consensus from each authority
...
...
@@ -87,7 +87,7 @@ def main():
count
=
len
(
list
(
query
)[
0
].
routers
)
log
.
debug
(
"
%i descriptors retrieved from %s in %0.2fs
"
%
(
count
,
query
.
download_url
,
query
.
runtime
))
else
:
log
.
warn
(
"
Unable to retrieve the consensus from %s: %s
"
%
(
authority
.
nickname
,
query
.
error
))
log
.
warn
ing
(
"
Unable to retrieve the consensus from %s: %s
"
%
(
authority
.
nickname
,
query
.
error
))
subject
=
EMAIL_SUBJECT
+
'
(%s)
'
%
authority
.
nickname
send_email
(
subject
,
'
consensus
'
,
query
)
...
...
@@ -98,7 +98,7 @@ def send_email(subject, descriptor_type, query):
timestamp
=
datetime
.
datetime
.
now
().
strftime
(
"
%m/%d/%Y %H:%M
"
)
util
.
send
(
subject
,
body
=
EMAIL_BODY
%
(
descriptor_type
,
query
.
download_url
,
timestamp
,
query
.
error
),
to
=
[
util
.
ERROR_ADDRESS
])
except
Exception
as
exc
:
log
.
warn
(
"
Unable to send email: %s
"
%
exc
)
log
.
warn
ing
(
"
Unable to send email: %s
"
%
exc
)
if
__name__
==
'
__main__
'
:
...
...
This diff is collapsed.
Click to expand it.
package_versions.py
+
1
−
1
View file @
d86ad6b9
...
...
@@ -214,6 +214,6 @@ if __name__ == '__main__':
try
:
util
.
send
(
'
Packages wiki possibly outdated
'
,
body
=
content
,
to
=
[
'
atagar@torproject.org
'
])
except
Exception
as
exc
:
log
.
warn
(
"
Unable to send email: %s
"
%
exc
)
log
.
warn
ing
(
"
Unable to send email: %s
"
%
exc
)
log
.
debug
(
'
\n
'
+
content
)
This diff is collapsed.
Click to expand it.
sybil_checker.py
+
2
−
2
View file @
d86ad6b9
...
...
@@ -57,7 +57,7 @@ def main():
query
.
run
(
True
)
if
query
.
error
:
log
.
warn
(
"
Unable to retrieve the consensus: %s
"
%
query
.
error
)
log
.
warn
ing
(
"
Unable to retrieve the consensus: %s
"
%
query
.
error
)
return
# mapping of fingerprints to their router status entry
...
...
@@ -95,7 +95,7 @@ def send_email(new_relays):
util
.
send
(
EMAIL_SUBJECT
,
body
=
body
)
except
Exception
as
exc
:
log
.
warn
(
"
Unable to send email: %s
"
%
exc
)
log
.
warn
ing
(
"
Unable to send email: %s
"
%
exc
)
def
load_fingerprints
():
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment