[tor-bugs] #8701 [Stem]: Stem doesn't recognize error 555 on attach_stream

Tor Bug Tracker & Wiki blackhole at torproject.org
Sat Apr 13 21:13:48 UTC 2013


#8701: Stem doesn't recognize error 555 on attach_stream
-------------------------+--------------------------------------------------
 Reporter:  cypherpunks  |          Owner:  atagar
     Type:  defect       |         Status:  new   
 Priority:  normal       |      Milestone:        
Component:  Stem         |        Version:        
 Keywords:               |         Parent:        
   Points:               |   Actualpoints:        
-------------------------+--------------------------------------------------
 When trying to attach a stream that is not controlled by the controller
 using Controller.attach_stream, Tor will reply with error 555. Stem does
 not recognize this and will throw a generic exception:

 {{{
 stem.ProtocolError: ATTACHSTREAM returned unexpected response code: 555
 }}}

 I think an InvalidArguments exception would be best suited for this error
 code.

 {{{
 @@ -1981,6 +1981,8 @@ class Controller(BaseController):
          raise stem.InvalidRequest(response.code, response.message)
        elif response.code == '551':
          raise stem.OperationFailed(response.code, response.message)
 +      elif response.code == '555':
 +        raise stem.InvalidArguments(response.code, response.message)
        else:
          raise stem.ProtocolError("ATTACHSTREAM returned unexpected
 response code: %s" % response.code)
 }}}

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/8701>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list