Skip to content
  • Philipp Winter's avatar
    Don't assume that request has "command" key. · b3de2e35
    Philipp Winter authored
    If GetTor deals with an autoresponder, it returns an empty request,
    which is then passed to parse_callback, which raises a KeyError because
    of request["command"]:
    
    2020-05-29 19:04:43+0000 [email parser] Error while parsing email content: [Failure instance: Traceback: <class 'KeyError'>: 'command'
    	/usr/lib/python3/dist-packages/twisted/internet/defer.py:311:addCallbacks
    	/usr/lib/python3/dist-packages/twisted/internet/defer.py:654:_runCallbacks
    	/usr/lib/python3/dist-packages/twisted/internet/defer.py:1613:unwindGenerator
    	/usr/lib/python3/dist-packages/twisted/internet/defer.py:1529:_cancellableInlineCallbacks
    	--- <exception caught here> ---
    	/usr/lib/python3/dist-packages/twisted/internet/defer.py:1418:_inlineCallbacks
    	/srv/gettor.torproject.org/home/gettor/gettor/parse/email.py:256:parse_callback
    	].
    
    This is a fixup of: <https://bugs.torproject.org/34286>
    b3de2e35