This commit is contained in:
Luke Rogers 2013-11-30 17:40:09 +13:00
parent 6b4f3ac546
commit 2fa3a5a015
1 changed files with 5 additions and 3 deletions

View File

@ -85,8 +85,10 @@ def newegg(inp):
)
# get the first result
item = r["ProductListItems"][0]
return format_item(item)
if r["ProductListItems"]:
item = r["ProductListItems"][0]
return format_item(item)
else:
return "No results found."