mirror of
https://github.com/python/cpython.git
synced 2025-09-02 15:07:53 +00:00
Replace str.find()!=1 with the more readable "in" operator.
This commit is contained in:
parent
c5e378da41
commit
bac788a3cd
7 changed files with 9 additions and 9 deletions
|
@ -214,7 +214,7 @@ class Entry:
|
|||
# we have the catch-all agent
|
||||
return True
|
||||
agent = agent.lower()
|
||||
if useragent.find(agent) != -1:
|
||||
if agent in useragent:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue