diff --git a/plugins/PluginDownloader/plugin.py b/plugins/PluginDownloader/plugin.py index 21d408d56..5f710ed49 100644 --- a/plugins/PluginDownloader/plugin.py +++ b/plugins/PluginDownloader/plugin.py @@ -169,33 +169,38 @@ class GithubRepository(GitRepository): repositories = { - 'ProgVal': GithubRepository( - 'ProgVal', - 'Supybot-plugins' - ), - 'quantumlemur': GithubRepository( - 'quantumlemur', - 'Supybot-plugins', - ), - 'stepnem': GithubRepository( - 'stepnem', - 'supybot-plugins', - ), - 'gsf-snapshot': GithubRepository( - 'gsf', - 'supybot-plugins', - 'Supybot-plugins-20060723', - ), - 'gsf-edsu': GithubRepository( - 'gsf', - 'supybot-plugins', - 'edsu-plugins', - ), - 'gsf': GithubRepository( - 'gsf', - 'supybot-plugins', - 'plugins', - ), + 'ProgVal': GithubRepository( + 'ProgVal', + 'Supybot-plugins' + ), + 'quantumlemur': GithubRepository( + 'quantumlemur', + 'Supybot-plugins', + ), + 'stepnem': GithubRepository( + 'stepnem', + 'supybot-plugins', + ), + 'gsf-snapshot': GithubRepository( + 'gsf', + 'supybot-plugins', + 'Supybot-plugins-20060723', + ), + 'gsf-edsu': GithubRepository( + 'gsf', + 'supybot-plugins', + 'edsu-plugins', + ), + 'gsf': GithubRepository( + 'gsf', + '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) diff --git a/plugins/PluginDownloader/test.py b/plugins/PluginDownloader/test.py index 4f4135bff..62ed49f20 100644 --- a/plugins/PluginDownloader/test.py +++ b/plugins/PluginDownloader/test.py @@ -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: