Twitter: Show an error message if python-twitter cannot be imported.

master
Valentin Lorentz 2012-08-01 08:16:24 +00:00
parent 423a34da03
commit ad09738671
1 changed files with 4 additions and 1 deletions

View File

@ -32,7 +32,6 @@ import config
reload(config)
import time
import twitter
import threading
import simplejson
import supybot.conf as conf
@ -53,6 +52,10 @@ except:
_ = lambda x:x
internationalizeDocstring = lambda x:x
try:
import twitter
except ImportError:
raise callbacks.Error, 'You need the python-twitter library.'
reload(twitter)
if twitter.__version__.split('.') < ['0', '8', '0']:
raise ImportError('You current version of python-twitter is to old, '