Twitter: Catch SyntaxError exceptions and raise callbacks.Error instead.

master
Valentin Lorentz 2014-04-16 07:21:15 +00:00
parent e0b1c998a7
commit 7f8fcfd54c
1 changed files with 2 additions and 0 deletions

View File

@ -67,6 +67,8 @@ try:
import twitter
except ImportError:
raise callbacks.Error('You need the python-twitter library.')
except Exception as e:
raise callbacks.Error('Unknown exception importing twitter: %r' % e)
reload(twitter)
if not hasattr(twitter, '__version__') or \
twitter.__version__.split('.') < ['0', '8', '0']: