diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2017-02-20 15:34:30 -0800 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2017-02-20 15:34:30 -0800 |
commit | b83580d54933195c3a79e558795df59447614a57 (patch) | |
tree | 299227899536c10c1a2fd26a7544952278a91887 | |
parent | 72be58b2292b0321adae39a3c4403589a4d09c7f (diff) | |
parent | 12004eb6869984730a385b833c84daf94a4d422e (diff) |
Merge branch '2.1'
-rw-r--r-- | paramiko/message.py | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/paramiko/message.py b/paramiko/message.py index bf4c6b95..05c1dd4c 100644 --- a/paramiko/message.py +++ b/paramiko/message.py @@ -144,9 +144,6 @@ class Message (object): def get_int(self): """ Fetch an int from the stream. - - @return: a 32-bit unsigned integer. - @rtype: int """ return struct.unpack('>I', self.get_bytes(4))[0] @@ -176,24 +173,15 @@ class Message (object): def get_text(self): """ - Fetch a string from the stream. This could be a byte string and may - contain unprintable characters. (It's not unheard of for a string to - contain another byte-stream Message.) - - @return: a string. - @rtype: string + Fetch a Unicode string from the stream. """ - return u(self.get_bytes(self.get_int())) - #return self.get_bytes(self.get_size()) + return u(self.get_string()) def get_binary(self): """ Fetch a string from the stream. This could be a byte string and may contain unprintable characters. (It's not unheard of for a string to contain another byte-stream Message.) - - @return: a string. - @rtype: string """ return self.get_bytes(self.get_int()) |