Skip to content

Commit

Permalink
Notify if Bugzilla is private (#1115)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
psachin authored and maxpowa committed Sep 30, 2016
1 parent 7dfae7e commit 23b02bf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sopel/modules/bugzilla.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 | ' +
Expand Down

0 comments on commit 23b02bf

Please sign in to comment.