PluginDownloader: Fix @info for Python 3.

This commit is contained in:
Valentin Lorentz 2013-07-30 10:53:58 +02:00
parent b4eb4bfd65
commit 4d801a02c5
2 changed files with 9 additions and 1 deletions

View File

@ -153,7 +153,10 @@ class GithubRepository(GitRepository):
for file in archive.getmembers():
if file.name.startswith(prefix + dirname + '/README'):
extractedFile = archive.extractfile(file)
return extractedFile.read()
content = extractedFile.read()
if sys.version_info[0] >= 3:
content = content.decode()
return content
def _getWritableDirectoryFromList(self, directories):
for directory in directories:

View File

@ -92,6 +92,11 @@ class PluginDownloaderTestCase(PluginTestCase):
self.assertNotError('plugindownloader install SpiderDave Pastebin')
self._testPluginInstalled('Pastebin')
def testInfo(self):
self.assertResponse('plugindownloader info ProgVal Twitter',
'Advanced Twitter plugin for Supybot, with capabilities '
'handling, and per-channel user account.')
if not network:
class PluginDownloaderTestCase(PluginTestCase):
pass