Applied a patch to weather.py from Chris Waigl, and fixed search.py.

This commit is contained in:
Sean B. Palmer
2008-11-24 21:14:22 +00:00
parent 4eb5bb8942
commit d26fc8d81f
2 changed files with 17 additions and 19 deletions

View File

@@ -31,9 +31,8 @@ def search(query):
def result(query):
results = search(query)
if results['responseData']:
return results['responseData']['results'][0]['unescapedUrl']
return None
try: return results['responseData']['results'][0]['unescapedUrl']
except IndexError: return None
def count(query):
results = search(query)