comparison taginthemiddle/handlers.py @ 11:fc55d95be553

it is list.index, not list.find, silly!
author Jeff Hammel <jhammel@mozilla.com>
date Wed, 05 May 2010 22:37:42 -0700
parents 1182315b18ac
children 1ae2f98f9675
comparison
equal deleted inserted replaced
10:4c9acbfaa2d2 11:fc55d95be553
91 91
92 def __init__(self, app, request): 92 def __init__(self, app, request):
93 GenshiHandler.__init__(self, app, request) 93 GenshiHandler.__init__(self, app, request)
94 path = request.path_info.split('/') 94 path = request.path_info.split('/')
95 try: 95 try:
96 index = path.find(app.tags_url) 96 index = path.index(app.tags_url)
97 except ValueError: 97 except ValueError:
98 raise HandlerMatchException 98 raise HandlerMatchException
99 self.tags = path[index+1:] 99 self.tags = path[index+1:]
100 if not self.tags: 100 if not self.tags:
101 raise HandlerMatchException 101 raise HandlerMatchException