Returns a L{Crash} object using the data retrieved from the database. @type getMemoryDump: bool @param getMemoryDump: If C{True} retrieve the memory dump. Defaults to C{False} since this may be a costly operation. @rtype: L{Crash} @return: Cra
(self, getMemoryDump=False)
| 702 | self.notes = crash.notesReport() |
| 703 | |
| 704 | def toCrash(self, getMemoryDump=False): |
| 705 | """ |
| 706 | Returns a L{Crash} object using the data retrieved from the database. |
| 707 | |
| 708 | @type getMemoryDump: bool |
| 709 | @param getMemoryDump: If C{True} retrieve the memory dump. |
| 710 | Defaults to C{False} since this may be a costly operation. |
| 711 | |
| 712 | @rtype: L{Crash} |
| 713 | @return: Crash object. |
| 714 | """ |
| 715 | crash = Marshaller.loads(str(self.data)) |
| 716 | if not isinstance(crash, Crash): |
| 717 | raise TypeError("Expected Crash instance, got %s instead" % type(crash)) |
| 718 | crash._rowid = self.id |
| 719 | if not crash.memoryMap: |
| 720 | memory = getattr(self, "memory", []) |
| 721 | if memory: |
| 722 | crash.memoryMap = [dto.toMBI(getMemoryDump) for dto in memory] |
| 723 | return crash |
| 724 | |
| 725 | |
| 726 | # ============================================================================== |
no test coverage detected