(sort of) FIX: publishing items whose headlines contained umlauts previously resulted in an exception
This commit is contained in:
parent
b7207881cd
commit
3bfebb9e99
1 changed files with 3 additions and 0 deletions
|
@ -165,6 +165,9 @@ class Poll(sqlobject.SQLObject):
|
||||||
complete_url = self.get_url(absolute=True)
|
complete_url = self.get_url(absolute=True)
|
||||||
title = "%s %s %s" % (config.get('misc', 'twitter_alert_prefix'),
|
title = "%s %s %s" % (config.get('misc', 'twitter_alert_prefix'),
|
||||||
self.title[:79], complete_url)
|
self.title[:79], complete_url)
|
||||||
|
# the following line is quick and dirty fix for the unicode bug twitter exception.
|
||||||
|
# of course it would be better to preserve the umlauts somehow...
|
||||||
|
title = title.encode('ascii','ignore')
|
||||||
twitter_key = config.get('misc', 'twitter_consumer_key')
|
twitter_key = config.get('misc', 'twitter_consumer_key')
|
||||||
twitter_secret = config.get('misc', 'twitter_consumer_secret')
|
twitter_secret = config.get('misc', 'twitter_consumer_secret')
|
||||||
twitter_access_key = config.get('misc', 'twitter_access_token_key')
|
twitter_access_key = config.get('misc', 'twitter_access_token_key')
|
||||||
|
|
Loading…
Reference in a new issue