Fix PEP8 in PR #2390
This commit is contained in:
parent
e306b2ba27
commit
76c1e09c84
3 changed files with 7 additions and 3 deletions
|
|
@ -40,7 +40,9 @@ class SuppressGA(object):
|
||||||
self.protocol = protocol
|
self.protocol = protocol
|
||||||
|
|
||||||
self.protocol.protocol_flags["NOGOAHEAD"] = True
|
self.protocol.protocol_flags["NOGOAHEAD"] = True
|
||||||
self.protocol.protocol_flags["NOPROMPTGOAHEAD"] = True # Used to send a GA after a prompt line only, set in TTYPE (per client)
|
self.protocol.protocol_flags[
|
||||||
|
"NOPROMPTGOAHEAD"
|
||||||
|
] = True # Used to send a GA after a prompt line only, set in TTYPE (per client)
|
||||||
# tell the client that we prefer to suppress GA ...
|
# tell the client that we prefer to suppress GA ...
|
||||||
self.protocol.will(SUPPRESS_GA).addCallbacks(self.will_suppress_ga, self.wont_suppress_ga)
|
self.protocol.will(SUPPRESS_GA).addCallbacks(self.will_suppress_ga, self.wont_suppress_ga)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -440,7 +440,8 @@ class TelnetProtocol(Telnet, StatefulTelnetProtocol, Session):
|
||||||
prompt = mxp_parse(prompt)
|
prompt = mxp_parse(prompt)
|
||||||
prompt = to_bytes(prompt, self)
|
prompt = to_bytes(prompt, self)
|
||||||
prompt = prompt.replace(IAC, IAC + IAC).replace(b"\n", b"\r\n")
|
prompt = prompt.replace(IAC, IAC + IAC).replace(b"\n", b"\r\n")
|
||||||
if not self.protocol_flags.get("NOPROMPTGOAHEAD", self.protocol_flags.get("NOGOAHEAD", True)):
|
if not self.protocol_flags.get("NOPROMPTGOAHEAD",
|
||||||
|
self.protocol_flags.get("NOGOAHEAD", True)):
|
||||||
prompt += IAC + GA
|
prompt += IAC + GA
|
||||||
self.transport.write(mccp_compress(self, prompt))
|
self.transport.write(mccp_compress(self, prompt))
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,8 @@ class Ttype(object):
|
||||||
if clientname.startswith("MUDLET"):
|
if clientname.startswith("MUDLET"):
|
||||||
# supports xterm256 stably since 1.1 (2010?)
|
# supports xterm256 stably since 1.1 (2010?)
|
||||||
xterm256 = clientname.split("MUDLET", 1)[1].strip() >= "1.1"
|
xterm256 = clientname.split("MUDLET", 1)[1].strip() >= "1.1"
|
||||||
# Mudlet likes GA's on a prompt line for the prompt trigger to match, if it's not wanting NOGOAHEAD.
|
# Mudlet likes GA's on a prompt line for the prompt trigger to
|
||||||
|
# match, if it's not wanting NOGOAHEAD.
|
||||||
if not self.protocol.protocol_flags["NOGOAHEAD"]:
|
if not self.protocol.protocol_flags["NOGOAHEAD"]:
|
||||||
self.protocol.protocol_flags["NOGOAHEAD"] = True
|
self.protocol.protocol_flags["NOGOAHEAD"] = True
|
||||||
self.protocol.protocol_flags["NOPROMPTGOAHEAD"] = False
|
self.protocol.protocol_flags["NOPROMPTGOAHEAD"] = False
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue