u(p) [count] Move the current frame count (default one) levels up in the stack trace (to an older frame).
(self, arg)
| 1000 | self.lineno = None |
| 1001 | |
| 1002 | def do_up(self, arg): |
| 1003 | """u(p) [count] |
| 1004 | Move the current frame count (default one) levels up in the |
| 1005 | stack trace (to an older frame). |
| 1006 | """ |
| 1007 | if self.curindex == 0: |
| 1008 | self.error('Oldest frame') |
| 1009 | return |
| 1010 | try: |
| 1011 | count = int(arg or 1) |
| 1012 | except ValueError: |
| 1013 | self.error('Invalid frame count (%s)' % arg) |
| 1014 | return |
| 1015 | if count < 0: |
| 1016 | newframe = 0 |
| 1017 | else: |
| 1018 | newframe = max(0, self.curindex - count) |
| 1019 | self._select_frame(newframe) |
| 1020 | do_u = do_up |
| 1021 | |
| 1022 | def do_down(self, arg): |
nothing calls this directly
no test coverage detected