mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-14 14:49:21 +01:00
Merge branch 'testing' of github.com:ProgVal/Limnoria into l10n-fi
This commit is contained in:
commit
8d85d01838
@ -13,8 +13,3 @@ script:
|
||||
- echo $TRAVIS_PYTHON_VERSION
|
||||
- python setup.py install
|
||||
- supybot-test test --plugins-dir=./build/lib*/supybot/plugins/ --no-network --disable-multiprocessing --exclude=./build/lib*/supybot/plugins/Scheduler --exclude=./build/lib*/supybot/plugins/Filter
|
||||
notifications:
|
||||
irc:
|
||||
channels:
|
||||
- "chat.freenode.net#limnoria"
|
||||
on_success: change
|
||||
|
@ -1,6 +1,6 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR ORGANIZATION
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
# Aka plugin for Limnoria
|
||||
# Copyright (C) 2014 Limnoria
|
||||
# Mikaela Suomalainen <mikaela.suomalainen@outlook.com>, 2014.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
|
@ -151,13 +151,21 @@ class RSS(callbacks.Plugin):
|
||||
pubDate = ' [%s]' % (headline[2],)
|
||||
if sys.version_info[0] < 3:
|
||||
if isinstance(headline[0], unicode):
|
||||
try:
|
||||
import charade.universaldetector
|
||||
u = charade.universaldetector.UniversalDetector()
|
||||
u.feed(headline[0])
|
||||
u.close()
|
||||
encoding = u.result['encoding']
|
||||
except ImportError:
|
||||
encoding = 'utf8'
|
||||
newheadlines.append(format('%s %u%s',
|
||||
headline[0].encode('utf-8','replace'),
|
||||
headline[0].encode(encoding,'replace'),
|
||||
link,
|
||||
pubDate))
|
||||
else:
|
||||
newheadlines.append(format('%s %u%s',
|
||||
headline[0].decode('utf-8','replace'),
|
||||
headline[0],
|
||||
link,
|
||||
pubDate))
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user