mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-30 06:49:24 +01:00
PluginDownloader: Fix @info for Python 3.
This commit is contained in:
parent
b4eb4bfd65
commit
4d801a02c5
@ -153,7 +153,10 @@ class GithubRepository(GitRepository):
|
|||||||
for file in archive.getmembers():
|
for file in archive.getmembers():
|
||||||
if file.name.startswith(prefix + dirname + '/README'):
|
if file.name.startswith(prefix + dirname + '/README'):
|
||||||
extractedFile = archive.extractfile(file)
|
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):
|
def _getWritableDirectoryFromList(self, directories):
|
||||||
for directory in directories:
|
for directory in directories:
|
||||||
|
@ -92,6 +92,11 @@ class PluginDownloaderTestCase(PluginTestCase):
|
|||||||
self.assertNotError('plugindownloader install SpiderDave Pastebin')
|
self.assertNotError('plugindownloader install SpiderDave Pastebin')
|
||||||
self._testPluginInstalled('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:
|
if not network:
|
||||||
class PluginDownloaderTestCase(PluginTestCase):
|
class PluginDownloaderTestCase(PluginTestCase):
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user