launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #05628
[Merge] lp:~lifeless/python-oops-tools/bug-892914 into lp:python-oops-tools
Robert Collins has proposed merging lp:~lifeless/python-oops-tools/bug-892914 into lp:python-oops-tools.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~lifeless/python-oops-tools/bug-892914/+merge/82842
Currently failures in amqp2disk are horridly opaque. This prints out the path to the failed oops to make it easier to inspect them.
--
https://code.launchpad.net/~lifeless/python-oops-tools/bug-892914/+merge/82842
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~lifeless/python-oops-tools/bug-892914 into lp:python-oops-tools.
=== modified file 'src/oopstools/NEWS.txt'
--- src/oopstools/NEWS.txt 2011-11-16 23:21:38 +0000
+++ src/oopstools/NEWS.txt 2011-11-21 04:01:23 +0000
@@ -8,6 +8,10 @@
* Corrupt timeline objects are handled more gracefully if they are not a list,
or the list rows are too short or too long. (Robert Collins, #890001)
+* Failures in processing an AMQP sourced OOPS will now write out the path to
+ the disk copy of the failed OOPS, to ease debugging.
+ (Robert Collins, #892914)
+
* Flush stdout when logging an OOPS receipt in amqp2disk.
(Robert Collins, #884569)
=== modified file 'src/oopstools/scripts/amqp2disk.py'
--- src/oopstools/scripts/amqp2disk.py 2011-11-02 21:29:36 +0000
+++ src/oopstools/scripts/amqp2disk.py 2011-11-21 04:01:23 +0000
@@ -125,9 +125,13 @@
try:
res = Oops.objects.get(oopsid__exact=report['id'])
except Oops.DoesNotExist:
- res = parsed_oops_to_model_oops(
- report, report['datedir_repo_filepath'])
- return res.oopsid
+ oops_path = report['datedir_repo_filepath']
+ try:
+ res = parsed_oops_to_model_oops(report, oops_path)
+ return res.oopsid
+ except:
+ sys.stderr.write('Failed while processing %s\n' % oops_path)
+ raise
return None