diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2017-02-20 15:33:48 -0800 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2017-02-20 15:34:22 -0800 |
commit | 12004eb6869984730a385b833c84daf94a4d422e (patch) | |
tree | 299227899536c10c1a2fd26a7544952278a91887 | |
parent | c28f97708e519a2522a349132fe7650e33e2b4dc (diff) | |
parent | e9ca25562e0578ebdf97f0ca00157009451a47c4 (diff) |
Merge branch '1.18' into test-branch
-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()) |