Skip to content

Commit 703e770

Browse files
committed
use makefile flags supported by py3k
1 parent 586c8c7 commit 703e770

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

clamd.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,14 +224,14 @@ def _recv_response(self):
224224
"""
225225
receive line from clamd
226226
"""
227-
with contextlib.closing(self.clamd_socket.makefile('r+w')) as f:
227+
with contextlib.closing(self.clamd_socket.makefile('rb')) as f:
228228
return f.readline().decode('utf-8').strip()
229229

230230
def _recv_response_multiline(self):
231231
"""
232232
receive multiple line response from clamd and strip all whitespace characters
233233
"""
234-
with contextlib.closing(self.clamd_socket.makefile('r+w')) as f:
234+
with contextlib.closing(self.clamd_socket.makefile('rb')) as f:
235235
return f.read().decode('utf-8')
236236

237237
def _close_socket(self):

0 commit comments

Comments
 (0)