~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to cronscripts/expire-bugtasks.py

  • Committer: j.c.sackett
  • Date: 2011-04-20 14:25:14 UTC
  • mto: This revision was merged to the branch mainline in revision 12888.
  • Revision ID: jonathan.sackett@canonical.com-20110420142514-raq55nentb8gtuug
Fixed brain dead exception code per comment in review. Much better.

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
        try:
51
51
            janitor = BugJanitor(
52
52
                log=self.logger, target=target, limit=self.options.limit)
53
 
        except Exception as error:
54
 
            # We use a catchall here (and in the next block) because we don't
55
 
            # know (and don't care) about the particular error--we'll just
56
 
            # log it to as an Oops.
57
 
            self.logger.error(
58
 
                'An error occured getting the janitor: %s' % error)
59
 
        try:
60
53
            janitor.expireBugTasks(self.txn)
61
 
        except Exception as error:
 
54
        except Exception:
 
55
            # We use a catchall here because we don't know (and don't care)
 
56
            # about the particular error--we'll just log it to as an Oops.
62
57
            self.logger.error(
63
 
                'An error occured trying to expire bugtasks: %s' % error)
 
58
                'An error occured trying to expire bugtasks.', exc_info=1)
 
59
            raise
64
60
 
65
61
 
66
62
if __name__ == '__main__':