mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 13:19:24 +01:00
Make sure to catch amazon.NoLicenseKey and provide a nice "hold-my-hand" help
message.
This commit is contained in:
parent
f364bb9705
commit
09eae1bdcc
@ -80,6 +80,16 @@ conf.registerGlobalValue(conf.supybot.plugins.Amazon, 'licenseKey',
|
||||
class Amazon(callbacks.Privmsg):
|
||||
threaded = True
|
||||
|
||||
def callCommand(self, method, irc, msg, *L):
|
||||
try:
|
||||
callbacks.Privmsg.callCommand(self, method, irc, msg, *L)
|
||||
except amazon.NoLicenseKey, e:
|
||||
irc.error('You must have a free Amazon web services license key '
|
||||
'in order to use this command. You can get one at '
|
||||
'<http://www.amazon.com/webservices>. Once you have '
|
||||
'one, you can set it with the command '
|
||||
'"config supybot.plugins.Amazon.licensekey <key>".')
|
||||
|
||||
def _genResults(self, reply, attribs, items, url, bold, bold_item):
|
||||
results = {}
|
||||
res = []
|
||||
|
Loading…
Reference in New Issue
Block a user