mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
String method conversion.
This commit is contained in:
parent
20e4423ade
commit
b49f4a4b15
5 changed files with 13 additions and 20 deletions
|
@ -48,7 +48,6 @@ you - by calling your self.found_terminator() method.
|
|||
|
||||
import socket
|
||||
import asyncore
|
||||
import string
|
||||
|
||||
class async_chat (asyncore.dispatcher):
|
||||
"""This is an abstract class. You must derive from this class, and add
|
||||
|
@ -120,7 +119,7 @@ class async_chat (asyncore.dispatcher):
|
|||
# 3) end of buffer does not match any prefix:
|
||||
# collect data
|
||||
terminator_len = len(terminator)
|
||||
index = string.find (self.ac_in_buffer, terminator)
|
||||
index = terminator.find (self.ac_in_buffer)
|
||||
if index != -1:
|
||||
# we found the terminator
|
||||
if index > 0:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue