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)
| 869 | complete_disable = _complete_bpnumber |
| 870 | |
| 871 | def do_condition(self, arg): |
| 872 | """condition bpnumber [condition] |
| 873 | Set a new condition for the breakpoint, an expression which |
| 874 | must evaluate to true before the breakpoint is honored. If |
| 875 | condition is absent, any existing condition is removed; i.e., |
| 876 | the breakpoint is made unconditional. |
| 877 | """ |
| 878 | args = arg.split(' ', 1) |
| 879 | try: |
| 880 | cond = args[1] |
| 881 | except IndexError: |
| 882 | cond = None |
| 883 | try: |
| 884 | bp = self.get_bpbynumber(args[0].strip()) |
| 885 | except IndexError: |
| 886 | self.error('Breakpoint number expected') |
| 887 | except ValueError as err: |
| 888 | self.error(err) |
| 889 | else: |
| 890 | bp.cond = cond |
| 891 | if not cond: |
| 892 | self.message('Breakpoint %d is now unconditional.' % bp.number) |
| 893 | else: |
| 894 | self.message('New condition set for breakpoint %d.' % bp.number) |
| 895 | |
| 896 | complete_condition = _complete_bpnumber |
| 897 |
nothing calls this directly
no test coverage detected