checkwatches error handling needs refactoring

Bug #225228 reported by Graham Binns
6
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Low
Unassigned

Bug Description

At the moment, when checkwatches encounters an error when updating bug statuses, it goes through an extended try:except:except:except block to produce the correct response (see l/c/l/scripts/checkwatches.py:419). The contents of each except block are virtually identical.

Instead of this duplication of code, we should have a single except clause that catches all exceptions of a given type (say BugWatchUpdateWarning) and which uses the exception's error message to produce the correct log output.

Tags: lp-bugs
Graham Binns (gmb)
Changed in malone:
assignee: nobody → gmb
importance: Undecided → Low
milestone: none → 1.2.5
status: New → Confirmed
Changed in malone:
milestone: 1.2.5 → 1.2.6
Changed in malone:
milestone: 1.2.6 → none
Graham Binns (gmb)
Changed in malone:
assignee: Graham Binns (gmb) → nobody
Curtis Hovey (sinzui)
visibility: private → public
William Grant (wgrant)
Changed in launchpad:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.