Adds a new crash to the container. @note: When the C{allowRepeatedKeys} parameter of the constructor is set to C{False}, duplicated crashes are ignored. @see: L{Crash.key} @type crash: L{Crash} @param crash: Crash object to add.
(self, crash)
| 1850 | return bool(len(self)) |
| 1851 | |
| 1852 | def add(self, crash): |
| 1853 | """ |
| 1854 | Adds a new crash to the container. |
| 1855 | |
| 1856 | @note: |
| 1857 | When the C{allowRepeatedKeys} parameter of the constructor |
| 1858 | is set to C{False}, duplicated crashes are ignored. |
| 1859 | |
| 1860 | @see: L{Crash.key} |
| 1861 | |
| 1862 | @type crash: L{Crash} |
| 1863 | @param crash: Crash object to add. |
| 1864 | """ |
| 1865 | self.__keys.add(crash.signature) |
| 1866 | self.__count += 1 |
| 1867 | |
| 1868 | def get(self, key): |
| 1869 | """ |