mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
PluginDownloaded: add nanotube-bitcoin repository and check a plugin exists before downloading the tarball
This commit is contained in:
parent
72600e54af
commit
8fe3e77428
@ -196,6 +196,11 @@ repositories = {
|
||||
'supybot-plugins',
|
||||
'plugins',
|
||||
),
|
||||
'nanotube-bitcoin': GithubRepository(
|
||||
'nanotube',
|
||||
'supybot-bitcoin-'
|
||||
'marketmonitor',
|
||||
),
|
||||
}
|
||||
|
||||
class PluginDownloader(callbacks.Plugin):
|
||||
@ -237,6 +242,8 @@ class PluginDownloader(callbacks.Plugin):
|
||||
'This repository does not exist or is not known by '
|
||||
'this bot.'
|
||||
))
|
||||
elif plugin not in repositories[repository].getPluginList():
|
||||
irc.error(_('This plugin does not exist in this repository.'))
|
||||
else:
|
||||
try:
|
||||
repositories[repository].install(plugin)
|
||||
|
@ -79,7 +79,7 @@ class PluginDownloaderTestCase(PluginTestCase):
|
||||
self.assertNotError('plugindownloader install stepnem Freenode')
|
||||
self._testPluginInstalled('Freenode')
|
||||
|
||||
def testGsf(self):
|
||||
def testInstallGsf(self):
|
||||
self.assertNotError('plugindownloader install gsf-snapshot Debian')
|
||||
self._testPluginInstalled('Debian')
|
||||
self.assertError('plugindownloader install gsf-snapshot Anagram')
|
||||
@ -95,4 +95,9 @@ class PluginDownloaderTestCase(PluginTestCase):
|
||||
self.assertError('plugindownloader install gsf Anagram')
|
||||
self.assertError('plugindownloader install gsf Debian')
|
||||
|
||||
def testInstallNanotubeBitcoin(self):
|
||||
self.assertNotError('plugindownloader install nanotube-bitcoin GPG')
|
||||
self._testPluginInstalled('GPG')
|
||||
|
||||
|
||||
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:
|
||||
|
Loading…
Reference in New Issue
Block a user