mirror of
https://github.com/jlu5/SupyPlugins.git
synced 2025-05-01 16:01:06 -05:00
PkgInfo: fix error handling in 'pkgsearch'
This commit is contained in:
parent
c5f5c101e3
commit
976e273c67
@ -334,6 +334,7 @@ class PkgInfo(callbacks.Plugin):
|
|||||||
(len(results), 'result'), results, url)
|
(len(results), 'result'), results, url)
|
||||||
irc.reply(s)
|
irc.reply(s)
|
||||||
else:
|
else:
|
||||||
|
e = "No results found."
|
||||||
try:
|
try:
|
||||||
# Look for "too many results" errors and others reported by the
|
# Look for "too many results" errors and others reported by the
|
||||||
# web interface.
|
# web interface.
|
||||||
@ -347,7 +348,7 @@ class PkgInfo(callbacks.Plugin):
|
|||||||
br.replace_with(" ")
|
br.replace_with(" ")
|
||||||
e = errorParse.text.strip()
|
e = errorParse.text.strip()
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
e = "No results found."
|
pass
|
||||||
irc.error(e)
|
irc.error(e)
|
||||||
pkgsearch = wrap(pkgsearch, ['somethingWithoutSpaces',
|
pkgsearch = wrap(pkgsearch, ['somethingWithoutSpaces',
|
||||||
'somethingWithoutSpaces'])
|
'somethingWithoutSpaces'])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user