100% CPU Printing Deleted Filestore Invoices

If using document management, printed invoices are stored in the filestore as PDF files for later reprint. If the storing of the document fails, or the PDF is not accessible by openerp-server, subsequent attempts to print the invoice will cause the server to consume 100% of CPU. There is no check to see if the data returned from ir.attachment contains any data in report_sxy.py