From 976e273c67ae0e4839b8461fc8c8d72b76450ff7 Mon Sep 17 00:00:00 2001 From: James Lu Date: Wed, 29 Jul 2015 05:35:51 -0700 Subject: [PATCH] PkgInfo: fix error handling in 'pkgsearch' --- PkgInfo/plugin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PkgInfo/plugin.py b/PkgInfo/plugin.py index 0d96c0d..5657984 100644 --- a/PkgInfo/plugin.py +++ b/PkgInfo/plugin.py @@ -334,6 +334,7 @@ class PkgInfo(callbacks.Plugin): (len(results), 'result'), results, url) irc.reply(s) else: + e = "No results found." try: # Look for "too many results" errors and others reported by the # web interface. @@ -347,7 +348,7 @@ class PkgInfo(callbacks.Plugin): br.replace_with(" ") e = errorParse.text.strip() except AttributeError: - e = "No results found." + pass irc.error(e) pkgsearch = wrap(pkgsearch, ['somethingWithoutSpaces', 'somethingWithoutSpaces'])