aboutsummaryrefslogtreecommitdiffstats
path: root/netlib/tcp.py
diff options
context:
space:
mode:
Diffstat (limited to 'netlib/tcp.py')
-rw-r--r--netlib/tcp.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/netlib/tcp.py b/netlib/tcp.py
index 707e11e0..6dcc8c72 100644
--- a/netlib/tcp.py
+++ b/netlib/tcp.py
@@ -76,7 +76,7 @@ class SSLKeyLogger(object):
d = os.path.dirname(self.filename)
if not os.path.isdir(d):
os.makedirs(d)
- self.f = open(self.filename, "ab")
+ self.f = open(self.filename, "a")
self.f.write("\r\n")
client_random = connection.client_random().encode("hex")
masterkey = connection.master_key().encode("hex")
@@ -184,7 +184,7 @@ class Reader(_FileLike):
"""
If length is -1, we read until connection closes.
"""
- result = ''
+ result = b''
start = time.time()
while length == -1 or length > 0:
if length == -1 or length > self.BLOCKSIZE: