mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-02 17:29:22 +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):
|
class Amazon(callbacks.Privmsg):
|
||||||
threaded = True
|
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):
|
def _genResults(self, reply, attribs, items, url, bold, bold_item):
|
||||||
results = {}
|
results = {}
|
||||||
res = []
|
res = []
|
||||||
|
Loading…
Reference in New Issue
Block a user