]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
One-liner critical fix from Jim Fulton: Eric's string-method crusade
authorTim Peters <tim.peters@gmail.com>
Thu, 5 Apr 2001 22:26:23 +0000 (22:26 +0000)
committerTim Peters <tim.peters@gmail.com>
Thu, 5 Apr 2001 22:26:23 +0000 (22:26 +0000)
got the order backwards in a line (for .find()).

Lib/asynchat.py

index bcbfc012863b49211f8c29376f24beeb4fa5c48e..a46c1d42ac9f5f452e4b57a29c9f1fe6f1261a99 100644 (file)
@@ -119,7 +119,7 @@ class async_chat (asyncore.dispatcher):
                 # 3) end of buffer does not match any prefix:
                 #    collect data
                 terminator_len = len(terminator)
-                index = terminator.find (self.ac_in_buffer)
+                index = ac_in_buffer.find (self.terminator)
                 if index != -1:
                     # we found the terminator
                     if index > 0: