Skip to content
Permalink
Browse files
opentDB return error if couldn't get category
  • Loading branch information
André Silva committed Oct 30, 2017
1 parent 0c88756 commit 5470733ecf4b87101f0049056da493819aea44c7
Showing 1 changed file with 2 additions and 0 deletions.
@@ -81,6 +81,8 @@ def getOpentDB(category, difficulty, nrQuestions = 1):
if (category != "" and category.casefold() != "Any".casefold()
and category.casefold() != "Random".casefold()):
cat = opentDBCat()
if ("Error" in cat):
return(cat)
catID = None
for i in cat:
if (category is not None and category != ""

0 comments on commit 5470733

Please sign in to comment.