From 23b02bf11848eba3a1356299ee17be5f3dbdc472 Mon Sep 17 00:00:00 2001 From: Sachin Date: Sat, 1 Oct 2016 04:41:21 +0530 Subject: [PATCH] Notify if Bugzilla is private (#1115) Although the primary error no longer exist, but the bot shows nothing if the bugzilla has invalid alias, invaid id or if it has no valid permission to access the bug. The logs should show warnings such as, WARNING:sopel.modules.bugzilla:Bugzilla error: NotFound <- (Invalid ID) WARNING:sopel.modules.bugzilla:Bugzilla error: NotPermitted <- (No permission) This patch should notify about those errors. Closes-Bug: #1112 Signed-off-by: Sachin Patil --- sopel/modules/bugzilla.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sopel/modules/bugzilla.py b/sopel/modules/bugzilla.py index 9167128b24..c87ff08e09 100644 --- a/sopel/modules/bugzilla.py +++ b/sopel/modules/bugzilla.py @@ -70,7 +70,9 @@ def show_bug(bot, trigger, match=None): error = bug.get('@error', None) # error="NotPermitted" if error: - LOGGER.warning('Bugzilla error: %s', error) + LOGGER.warning('Bugzilla error: %s' % error) + bot.say('[BUGZILLA] Unable to get infomation for ' + 'linked bug (%s)' % error) return message = ('[BUGZILLA] %s | Product: %s | Component: %s | Version: %s | ' +