def destroySelf(self): """Delete this mirror from the database. Only mirrors which have never been probed can be deleted. """ assert self.last_probe_record is None, ( "This mirror has been probed and thus can't be removed.") SQLBase.destroySelf(self)
def destroySelf(self): """Remove this record and associated job/specific_job.""" job = self.job specific_job = self.specific_job builder = self.builder SQLBase.destroySelf(self) specific_job.cleanUp() job.destroySelf() if builder is not None: del get_property_cache(builder).currentjob self._clear_specific_job_cache()
def destroySelf(self): """See `IBugWatch`.""" if (len(self.bugtasks) > 0 or not self.getImportedBugMessages().is_empty()): raise BugWatchDeletionError( "Can't delete bug watches linked to tasks or comments.") # Remove any BugWatchActivity entries for this bug watch. self.activity.remove() # XXX 2010-09-29 gmb bug=647103 # We flush the store to make sure that errors bubble up and # are caught by the OOPS machinery. SQLBase.destroySelf(self) store = Store.of(self) store.flush()
def destroySelf(self): """See `IBranchJob`.""" SQLBase.destroySelf(self) self.job.destroySelf()
def destroySelf(self): """See `IProductRelease`.""" assert self._files.count() == 0, ( "You can't delete a product release which has files associated " "with it.") SQLBase.destroySelf(self)