Opened 7 years ago

Last modified 7 years ago

#6497 defect new

t.c.i.i.ServerProtocol.selectGraphicRendition doesn't comply with interface

Reported by: Tom Most Owned by:
Priority: normal Milestone:
Component: conch Keywords:
Cc: z3p Branch:


ITerminalTransport.selectGraphicRendition is documented as accepting the constants NORMAL, BOLD, etc. from the same module. However, those constance produce TypeError if passed, as they are ints rather than strings.

It looks like a call to str() is missing in the implementation:

class ServerProtocol(protocol.Protocol):

    def selectGraphicRendition(self, *attributes):
        attrs = []
        for a in attributes:
        self.write('\x1b[%sm' % (';'.join(attrs),))

The copying of attriutes is also a bit silly.

Change History (2)

comment:1 Changed 7 years ago by DefaultCC Plugin

Cc: z3p added

comment:2 Changed 7 years ago by Jean-Paul Calderone

Owner: 擦れなどがある場合がございますが deleted
Note: See TracTickets for help on using tickets.