Skip to content

Commit 67a7429

Browse files
author
James William Pye
committed
Provide a default for 'condition'.
However, it's really a pure-Python feature as the C version doesn't allow for a condition to be specified.
1 parent 29e88f8 commit 67a7429

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

postgresql/copyman.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ def update(self, view, getlen = ulong_unpack, len = len):
225225
# Emit the number of messages "consumed" this round.
226226
return nmessages
227227

228-
def __init__(self, condition):
228+
def __init__(self, condition = CopyData.type.__ne__):
229229
self.remaining_bytes = 0
230230
self.size_fragment = b''
231231
self.final_view = None
@@ -404,7 +404,7 @@ def process_copy_data(self, view):
404404

405405
# Given a view, begin tracking the state of the wire.
406406
def track_state(self, view):
407-
self._state = WireState(CopyData.type.__ne__)
407+
self._state = WireState()
408408
self.nextchunk = self.recv_view
409409
return self.process_copy_data(view)
410410

0 commit comments

Comments
 (0)