commit | bac788a3cd348203a5fdabba52e5faf65bf35c5e | [log] [tgz] |
---|---|---|
author | Raymond Hettinger <python@rcn.com> | Tue May 04 09:21:43 2004 +0000 |
committer | Raymond Hettinger <python@rcn.com> | Tue May 04 09:21:43 2004 +0000 |
tree | 3c5bfe8295936ad51df617ef0fd053ebac684357 | |
parent | c5e378da41641d5bc1e9b5c6c11bd470ff90b3e3 [diff] [blame] |
Replace str.find()!=1 with the more readable "in" operator.
diff --git a/Lib/robotparser.py b/Lib/robotparser.py index 6b23188..13d8ac2 100644 --- a/Lib/robotparser.py +++ b/Lib/robotparser.py
@@ -214,7 +214,7 @@ # we have the catch-all agent return True agent = agent.lower() - if useragent.find(agent) != -1: + if agent in useragent: return True return False