mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
Fix Python 2.6 support (broken in the two last commits).
This commit is contained in:
parent
8be1671867
commit
2f327ab9c1
@ -32,7 +32,7 @@ import sys
|
|||||||
import feedparser
|
import feedparser
|
||||||
from supybot.test import *
|
from supybot.test import *
|
||||||
import supybot.conf as conf
|
import supybot.conf as conf
|
||||||
if sys.version_info.major >= 3:
|
if sys.version_info[0] >= 3:
|
||||||
from io import StringIO
|
from io import StringIO
|
||||||
else:
|
else:
|
||||||
from cStringIO import StringIO
|
from cStringIO import StringIO
|
||||||
|
@ -448,7 +448,7 @@ def format(s, *args, **kwargs):
|
|||||||
# to add the character to the _formatRe regexp or it will be ignored
|
# to add the character to the _formatRe regexp or it will be ignored
|
||||||
# (and hard to debug if you don't know the trick).
|
# (and hard to debug if you don't know the trick).
|
||||||
# Of course, you should also document it in the docstring above.
|
# Of course, you should also document it in the docstring above.
|
||||||
if sys.version_info.major < 3:
|
if sys.version_info[0] < 3:
|
||||||
def pred(s):
|
def pred(s):
|
||||||
if isinstance(s, unicode):
|
if isinstance(s, unicode):
|
||||||
return s.encode('utf8')
|
return s.encode('utf8')
|
||||||
|
Loading…
Reference in New Issue
Block a user