Allow for there being no "errors" in the twitter api response.
Allow for there being no "errors" in the twitter api response.

When a successful "user" query to the twitter api is completed the json that is returned is a list.
In order to validate the response the code tests to see if it was a dictionary with an "error" key.
However passing a string as a index to a list will raise a TypeError, which was not being caught by the "except" clause.

I have added TypeError to the list of items being caught. There are of course other ways of verifying the response but I think just adding the TypeError is in keeping with what you have already done.

For reference, here is what I was seeing:

> python manage.py poll_twitter --traceback --force
Traceback (most recent call last):
  ...
  File "/.../lib/python2.7/site-packages/mezzanine/twitter/models.py", line 74, in run
    raise TwitterQueryException(tweets["errors"][0]["message"])
TypeError: list indices must be integers, not str

vladir/mezzanine,damnfine/mezzanine,dovydas/mezzanine,sjuxax/mezzanine,ZeroXn/mezzanine,gradel/mezzanine,frankier/mezzanine,biomassives/mezzanine,joshcartme/mezzanine,AlexHill/mezzanine,wbtuomela/mezzanine,dovydas/mezzanine,spookylukey/mezzanine,frankier/mezzanine,ZeroXn/mezzanine,industrydive/mezzanine,sjuxax/mezzanine,molokov/mezzanine,Cicero-Zhao/mezzanine,adrian-the-git/mezzanine,dustinrb/mezzanine,vladir/mezzanine,saintbird/mezzanine,theclanks/mezzanine,PegasusWang/mezzanine,saintbird/mezzanine,nikolas/mezzanine,stbarnabas/mezzanine,fusionbox/mezzanine,SoLoHiC/mezzanine,douglaskastle/mezzanine,ZeroXn/mezzanine,stbarnabas/mezzanine,PegasusWang/mezzanine,scarcry/snm-mezzanine,dsanders11/mezzanine,spookylukey/mezzanine,emile2016/mezzanine,agepoly/mezzanine,sjdines/mezzanine,ryneeverett/mezzanine,emile2016/mezzanine,webounty/mezzanine,webounty/mezzanine,PegasusWang/mezzanine,Cajoline/mezzanine,ryneeverett/mezzanine,eino-makitalo/mezzanine,batpad/mezzanine,spookylukey/mezzanine,frankchin/mezzanine,jjz/mezzanine,molokov/mezzanine,cccs-web/mezzanine,molokov/mezzanine,tuxinhang1989/mezzanine,Kniyl/mezzanine,dekomote/mezzanine-modeltranslation-backport,douglaskastle/mezzanine,adrian-the-git/mezzanine,emile2016/mezzanine,Cajoline/mezzanine,christianwgd/mezzanine,SoLoHiC/mezzanine,promil23/mezzanine,stephenmcd/mezzanine,eino-makitalo/mezzanine,jerivas/mezzanine,scarcry/snm-mezzanine,industrydive/mezzanine,sjuxax/mezzanine,Cajoline/mezzanine,agepoly/mezzanine,theclanks/mezzanine,wyzex/mezzanine,gradel/mezzanine,readevalprint/mezzanine,ryneeverett/mezzanine,wbtuomela/mezzanine,Skytorn86/mezzanine,promil23/mezzanine,viaregio/mezzanine,cccs-web/mezzanine,mush42/mezzanine,wbtuomela/mezzanine,viaregio/mezzanine,dsanders11/mezzanine,jerivas/mezzanine,Kniyl/mezzanine,douglaskastle/mezzanine,batpad/mezzanine,dekomote/mezzanine-modeltranslation-backport,sjdines/mezzanine,Kniyl/mezzanine,jerivas/mezzanine,Skytorn86/mezzanine,stephenmcd/mezzanine,eino-makitalo/mezzanine,nikolas/mezzanine,jjz/mezzanine,SoLoHiC/mezzanine,industrydive/mezzanine,tuxinhang1989/mezzanine,christianwgd/mezzanine,webounty/mezzanine,frankchin/mezzanine,scarcry/snm-mezzanine,joshcartme/mezzanine,Cicero-Zhao/mezzanine,gradel/mezzanine,tuxinhang1989/mezzanine,geodesign/mezzanine,AlexHill/mezzanine,viaregio/mezzanine,dustinrb/mezzanine,theclanks/mezzanine,fusionbox/mezzanine,joshcartme/mezzanine,nikolas/mezzanine,sjdines/mezzanine,promil23/mezzanine,readevalprint/mezzanine,frankier/mezzanine,dovydas/mezzanine,mush42/mezzanine,damnfine/mezzanine,biomassives/mezzanine,dustinrb/mezzanine,saintbird/mezzanine,jjz/mezzanine,wyzex/mezzanine,wyzex/mezzanine,geodesign/mezzanine,readevalprint/mezzanine,agepoly/mezzanine,vladir/mezzanine,geodesign/mezzanine,stephenmcd/mezzanine,frankchin/mezzanine,christianwgd/mezzanine,adrian-the-git/mezzanine,biomassives/mezzanine,Skytorn86/mezzanine,mush42/mezzanine,dekomote/mezzanine-modeltranslation-backport,damnfine/mezzanine,dsanders11/mezzanine