summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2018-03-12 17:46:53 -0700
committerJeff Forcier <jeff@bitprophet.org>2018-03-12 17:46:53 -0700
commitb9bc5fa8989a78310ef6a8a7380b98072fbea514 (patch)
treeafa5797a5016fdfc87b8e5bbc101b6c86b089327
parente7f03dc4c3acfbecd49ace4faa14018714a9cc94 (diff)
parent58b0dbc206e74ce0d76ca7a2afa109d73dc1bfbf (diff)
Merge branch '2.2' into 2.3
-rw-r--r--paramiko/transport.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/paramiko/transport.py b/paramiko/transport.py
index 0a3a6859..c2ef4fcc 100644
--- a/paramiko/transport.py
+++ b/paramiko/transport.py
@@ -1840,9 +1840,9 @@ class Transport(threading.Thread, ClosingContextManager):
Otherwise (client mode, authed, or pre-auth message) returns None.
"""
if (
- not self.server_mode
- or ptype <= HIGHEST_USERAUTH_MESSAGE_ID
- or self.is_authenticated()
+ not self.server_mode or
+ ptype <= HIGHEST_USERAUTH_MESSAGE_ID or
+ self.is_authenticated()
):
return None
# WELP. We must be dealing with someone trying to do non-auth things
@@ -1853,7 +1853,7 @@ class Transport(threading.Thread, ClosingContextManager):
reply.add_byte(cMSG_REQUEST_FAILURE)
# Channel opens let us reject w/ a specific type + message.
elif ptype == MSG_CHANNEL_OPEN:
- kind = message.get_text()
+ kind = message.get_text() # noqa
chanid = message.get_int()
reply.add_byte(cMSG_CHANNEL_OPEN_FAILURE)
reply.add_int(chanid)