[tor-bugs] #18666 [Stem]: ExitPolicy constructor inconsistent
Tor Bug Tracker & Wiki
blackhole at torproject.org
Mon Mar 28 21:41:57 UTC 2016
#18666: ExitPolicy constructor inconsistent
-----------------------+----------------------------
Reporter: Sebastian | Owner: atagar
Type: defect | Status: closed
Priority: Medium | Milestone:
Component: Stem | Version:
Severity: Normal | Resolution: worksforme
Keywords: | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
-----------------------+----------------------------
Comment (by atagar):
Actually, I suspect this confusion is because the ExitPolicy **does**
coincidently work with a single string argument...
{{{
>>> str(stem.exit_policy.ExitPolicy('reject *:80, accept *:*'))
'reject *:80, accept *:*'
}}}
Didn't intend that but it works due to how ExitPolicy handles arguments
internally and I'm cool with that. It's an intuitive way to use the class.
It only balked on you due to ending the string with a comma.
Pushed a
[https://gitweb.torproject.org/stem.git/commit/?id=0fc6178bf07f058bd788ffdacabe1c7897e1b01f
little tweak] so the commands you gave now work.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/18666#comment:2>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list