condition bpnumber [condition] Set a new condition for the breakpoint, an expression which must evaluate to true before the breakpoint is honored. If condition is absent, any existing condition is removed; i.e., the breakpoint is made unconditional.
(self, arg)
| 811 | complete_disable = _complete_bpnumber |
| 812 | |
| 813 | def do_condition(self, arg): |
| 814 | """condition bpnumber [condition] |
| 815 | Set a new condition for the breakpoint, an expression which |
| 816 | must evaluate to true before the breakpoint is honored. If |
| 817 | condition is absent, any existing condition is removed; i.e., |
| 818 | the breakpoint is made unconditional. |
| 819 | """ |
| 820 | args = arg.split(' ', 1) |
| 821 | try: |
| 822 | cond = args[1] |
| 823 | except IndexError: |
| 824 | cond = None |
| 825 | try: |
| 826 | bp = self.get_bpbynumber(args[0].strip()) |
| 827 | except IndexError: |
| 828 | self.error('Breakpoint number expected') |
| 829 | except ValueError as err: |
| 830 | self.error(err) |
| 831 | else: |
| 832 | bp.cond = cond |
| 833 | if not cond: |
| 834 | self.message('Breakpoint %d is now unconditional.' % bp.number) |
| 835 | else: |
| 836 | self.message('New condition set for breakpoint %d.' % bp.number) |
| 837 | |
| 838 | complete_condition = _complete_bpnumber |
| 839 |
nothing calls this directly
no test coverage detected