1
0
Fork 0
mirror of https://github.com/veekun/pokedex.git synced 2024-08-20 18:16:34 +00:00

Crash fix: lookup with empty prefixes.

This commit is contained in:
Eevee 2010-09-12 21:08:50 -07:00
parent 27364e1fbc
commit cf72e1db36
2 changed files with 10 additions and 1 deletions
pokedex

View file

@ -296,7 +296,11 @@ class PokedexLookup(object):
name = name.strip()
prefixes = prefix_chunk.split(',')
user_valid_types = [_.strip() for _ in prefixes]
user_valid_types = []
for prefix in prefixes:
prefix = prefix.strip()
if prefix:
user_valid_types.append(prefix)
# Merge the valid types together. Only types that appear in BOTH lists
# may be used.