| 294 | | XMLStore(Path.umitdb_ng, scan.get_xml_output_file(), |
| 295 | | inventory=inventory) |
| 296 | | scan.close() |
| 297 | | todelete.append(scan) |
| | 295 | try: |
| | 296 | XMLStore(Path.umitdb_ng, scan.get_xml_output_file(), |
| | 297 | inventory=inventory) |
| | 298 | except Exception: |
| | 299 | # failed while adding scan to the database |
| | 300 | dlg = GenericAlert(_("Database couldn't be updated!"), |
| | 301 | _("The scan for the Inventory %r finished but " |
| | 302 | "its results couldn't be added to the " |
| | 303 | "database.\n\n%s" % (inventory, |
| | 304 | traceback.format_exc())), |
| | 305 | buttons={1: (gtk.RESPONSE_OK, gtk.STOCK_OK)}) |
| | 306 | dlg.run() |
| | 307 | dlg.destroy() |
| | 308 | finally: |
| | 309 | scan.close() |
| | 310 | todelete.append(scan) |