Opened 4 years ago

Closed 4 years ago

#9344 defect closed fixed (fixed)

conch command with errors triggers TypeError on Python 3

Reported by: Craig Rodrigues Owned by: Craig Rodrigues <rodrigc@…>
Priority: normal Milestone: Python-3.x
Component: conch Keywords:
Cc: Branch:
Author:

Description

If I do:

conch localhost 'nonexistentcommand'

I get:

Unhandled Error
               Traceback (most recent call last):
                                                   File "/Users/crodrigues/twisted6/src/twisted/python/context.py", line 122, in callWithContext
                                                                                                                                                    return self.currentContext().callWithContext(ctx, func, *args, **kw)
                                                             File "/Users/crodrigues/twisted6/src/twisted/python/context.py", line 85, in callWithContext
                                                                                                                                                             return func(*args,**kw)
                         File "/Users/crodrigues/twisted6/src/twisted/conch/ssh/service.py", line 45, in packetReceived
                                                                                                                           return f(packet)
                                                                                                                                             File "/Users/crodrigues/twisted6/src/twisted/conch/ssh/connection.py", line 273, in ssh_CHANNEL_EXTENDED_DATA
                                                                                                 log.callWithLogger(channel, channel.extReceived, typeCode, data)
    --- <exception caught here> ---
                                     File "/Users/crodrigues/twisted6/src/twisted/python/log.py", line 103, in callWithLogger
                                                                                                                                 return callWithContext({"system": lp}, func, *args, **kw)
                               File "/Users/crodrigues/twisted6/src/twisted/python/log.py", line 86, in callWithContext
                                                                                                                           return context.call({ILogContext: newCtx}, func, *args, **kw)
                             File "/Users/crodrigues/twisted6/src/twisted/python/context.py", line 122, in callWithContext
    return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File "/Users/crodrigues/twisted6/src/twisted/python/context.py", line 85, in callWithContext
    return func(*args,**kw)
  File "/Users/crodrigues/twisted6/src/twisted/conch/scripts/conch.py", line 468, in extReceived
    sys.stderr.write(data)
builtins.TypeError: write() argument must be str, not bytes

Change History (3)

comment:1 Changed 4 years ago by Craig Rodrigues

Keywords: review added

comment:2 Changed 4 years ago by Craig Rodrigues

Keywords: review removed

comment:3 Changed 4 years ago by Craig Rodrigues <rodrigc@…>

Owner: set to Craig Rodrigues <rodrigc@…>
Resolution: fixed
Status: newclosed

In 8b30594:

Error: Processor CommitTicketReference failed
 does not appear to be a Git repository. See the log for more information.
Note: See TracTickets for help on using tickets.