don't do buttbot without password file

This commit is contained in:
Ryan Hitchman 2009-04-22 20:50:51 -06:00
parent bc46ef50e6
commit d9d0c3eca3
1 changed files with 6 additions and 0 deletions

View File

@ -20,3 +20,9 @@ def iambuttbot(bot, input):
data = urllib.urlencode({"status": status.encode('utf8')})
url = 'http://iambuttbot:%s@twitter.com/statuses/update.xml' % password
response = urllib.urlopen(url, data)
try:
open('iambuttbot_password')
except IOError:
print 'iambuttbot twitter password not found: module disabled'
del iambuttbot