diff --git a/plugins/RSS/test.py b/plugins/RSS/test.py index fa1dec66c..3b201a22a 100644 --- a/plugins/RSS/test.py +++ b/plugins/RSS/test.py @@ -32,7 +32,7 @@ import sys import feedparser from supybot.test import * import supybot.conf as conf -if sys.version_info.major >= 3: +if sys.version_info[0] >= 3: from io import StringIO else: from cStringIO import StringIO diff --git a/src/utils/str.py b/src/utils/str.py index f3003b43a..d9ca25f66 100644 --- a/src/utils/str.py +++ b/src/utils/str.py @@ -448,7 +448,7 @@ def format(s, *args, **kwargs): # to add the character to the _formatRe regexp or it will be ignored # (and hard to debug if you don't know the trick). # 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): if isinstance(s, unicode): return s.encode('utf8')