checkwatches is fragile when non-existent bugtrackers are specified at the command line

Bug #251282 reported by Graham Binns
2
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
Low
Unassigned
Ubuntu
Invalid
Undecided
Unassigned

Bug Description

If you use `checkwatches.py -t $bugtracker` to specify a bugtracker to update, checkwatches will error messily:

Traceback (most recent call last):
  File "./checkwatches.py", line 39, in ?
    script.lock_and_run()
  File "/srv/staging.launchpad.net/staging/launchpad/lib/canonical/launchpad/scripts/base.py", line 264, in lock_and_run
    implicit_begin=implicit_begin, isolation=isolation)
  File "/srv/staging.launchpad.net/staging/launchpad/lib/canonical/launchpad/scripts/base.py", line 224, in run
    self.main()
  File "./checkwatches.py", line 31, in main
    updater.updateBugTrackers(self.options.bug_trackers)
  File "/srv/staging.launchpad.net/staging/launchpad/cronscripts/../lib/canonical/launchpad/scripts/checkwatches.py", line 189, in updateBugTrackers
    bug_tracker_url = bug_tracker.baseurl
AttributeError: 'NoneType' object has no attribute 'baseurl'

This should at least be an OOPS, if not just a log message (since it's being run manually in such a case).

Revision history for this message
Graham Binns (gmb) wrote :

Rats. This should have been a malone bug; apologies.

Graham Binns (gmb)
Changed in malone:
importance: Undecided → Low
status: New → Confirmed
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.