summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--paramiko/message.py16
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())