Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sbws
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
juga
sbws
Commits
a6e4f06b
Commit
a6e4f06b
authored
6 years ago
by
juga
Browse files
Options
Downloads
Patches
Plain Diff
stem: catch exceptions raised when stopping sbws
parent
ff5e7d6b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sbws/util/stem.py
+6
-3
6 additions, 3 deletions
sbws/util/stem.py
with
6 additions
and
3 deletions
sbws/util/stem.py
+
6
−
3
View file @
a6e4f06b
import
socks
from
stem.control
import
(
Controller
,
Listener
)
from
stem
import
(
SocketError
,
InvalidRequest
,
UnsatisfiableRequest
,
OperationFailed
,
ControllerError
,
InvalidArguments
,
ProtocolError
)
ProtocolError
,
SocketClosed
)
from
stem.connection
import
IncorrectSocketType
import
stem.process
from
configparser
import
ConfigParser
...
...
@@ -250,8 +252,9 @@ def circuit_str(controller, circ_id):
log
.
warning
(
'
Circuit %s no longer seems to exist so can
\'
t return
'
'
a valid circuit string for it: %s
'
,
circ_id
,
e
)
return
None
except
ControllerError
as
e
:
log
.
exception
(
"
Exception trying to get circuit string %s
"
,
e
)
# exceptions raised when stopping the scanner
except
(
ControllerError
,
SocketClosed
,
socks
.
GeneralProxyError
)
as
e
:
log
.
debug
(
e
)
return
None
return
'
[
'
+
\
'
->
'
.
join
([
'
{} ({})
'
.
format
(
n
,
fp
[
0
:
8
])
for
fp
,
n
in
circ
.
path
])
+
\
...
...
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