def delete_breakpoint(w, size, key):
    bp_source_identifier = self.source_code_provider.get_source_identifier()
    if (bp_source_identifier is None):
        self.message('Cannot currently delete a breakpoint here--source code does not correspond to a file location. (perhaps this is generated code)')
    bp_list = self._get_bp_list()
    if bp_list:
        (_, pos) = self.bp_list._w.get_focus()
        bp = bp_list[pos]
        if ((bp_source_identifier == bp.file) and ((bp.line - 1) < len(self.source))):
            self.source[(bp.line - 1)].set_breakpoint(False)
        err = self.debugger.clear_break(bp.file, bp.line)
        if err:
            self.message(('Error clearing breakpoint:\n' + err))
        else:
            self.update_breakpoints()
def delete_breakpoint(w, size, key):
    bp_source_identifier = self.source_code_provider.get_source_identifier()
    if (bp_source_identifier is None):
        self.message('Cannot currently delete a breakpoint here--source code does not correspond to a file location. (perhaps this is generated code)')
    bp_list = self._get_bp_list()
    if bp_list:
        (_, pos) = self.bp_list._w.get_focus()
        bp = bp_list[pos]
        if ((bp_source_identifier == bp.file) and ((bp.line - 1) < len(self.source))):
            self.source[(bp.line - 1)].set_breakpoint(False)
        err = self.debugger.clear_break(bp.file, bp.line)
        if err:
            self.message(('Error clearing breakpoint:\n' + err))
        else:
            self.update_breakpoints()