~james-w/python-oops-tools/prod-deploy

« back to all changes in this revision

Viewing changes to src/oopstools/scripts/amqp2disk.py

  • Committer: Tarmac
  • Author(s): Robert Collins
  • Date: 2011-11-21 04:45:46 UTC
  • mfrom: (20.1.1 bug-892914)
  • Revision ID: launchpad@pqm.canonical.com-20111121044546-h08hwbee7uag18nj
Print out the path to the OOPS when amqp2disk fails to import it.

Show diffs side-by-side

added added

removed removed

Lines of Context:
125
125
    try:
126
126
        res = Oops.objects.get(oopsid__exact=report['id'])
127
127
    except Oops.DoesNotExist:
128
 
        res = parsed_oops_to_model_oops(
129
 
            report, report['datedir_repo_filepath'])
130
 
        return res.oopsid
 
128
        oops_path = report['datedir_repo_filepath']
 
129
        try:
 
130
            res = parsed_oops_to_model_oops(report, oops_path)
 
131
            return res.oopsid
 
132
        except:
 
133
            sys.stderr.write('Failed while processing %s\n' % oops_path)
 
134
            raise
131
135
    return None
132
136
 
133
137