Twitter: Catch SyntaxError exceptions and raise callbacks.Error instead.
parent
e0b1c998a7
commit
7f8fcfd54c
|
@ -67,6 +67,8 @@ try:
|
||||||
import twitter
|
import twitter
|
||||||
except ImportError:
|
except ImportError:
|
||||||
raise callbacks.Error('You need the python-twitter library.')
|
raise callbacks.Error('You need the python-twitter library.')
|
||||||
|
except Exception as e:
|
||||||
|
raise callbacks.Error('Unknown exception importing twitter: %r' % e)
|
||||||
reload(twitter)
|
reload(twitter)
|
||||||
if not hasattr(twitter, '__version__') or \
|
if not hasattr(twitter, '__version__') or \
|
||||||
twitter.__version__.split('.') < ['0', '8', '0']:
|
twitter.__version__.split('.') < ['0', '8', '0']:
|
||||||
|
|
Loading…
Reference in New Issue