diff options
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/asynchat.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/asynchat.py b/Lib/asynchat.py index 28b89a2..6f99ba1 100644 --- a/Lib/asynchat.py +++ b/Lib/asynchat.py @@ -101,11 +101,11 @@ class async_chat (asyncore.dispatcher): while self.ac_in_buffer: lb = len(self.ac_in_buffer) terminator = self.get_terminator() - if terminator is None or terminator == '': + if not terminator: # no terminator, collect it all self.collect_incoming_data (self.ac_in_buffer) self.ac_in_buffer = '' - elif isinstance(terminator, int): + elif isinstance(terminator, int) or isinstance(terminator, long): # numeric terminator n = terminator if lb < n: |