Show More
@@ -295,7 +295,7 b' class Pdb(OldPdb):' | |||||
295 | try: |
|
295 | try: | |
296 | OldPdb.interaction(self, frame, traceback) |
|
296 | OldPdb.interaction(self, frame, traceback) | |
297 | except KeyboardInterrupt: |
|
297 | except KeyboardInterrupt: | |
298 |
s |
|
298 | self.stdout.write('\n' + self.shell.get_exception_only()) | |
299 |
|
299 | |||
300 | def new_do_up(self, arg): |
|
300 | def new_do_up(self, arg): | |
301 | OldPdb.do_up(self, arg) |
|
301 | OldPdb.do_up(self, arg) | |
@@ -339,7 +339,7 b' class Pdb(OldPdb):' | |||||
339 | except KeyboardInterrupt: |
|
339 | except KeyboardInterrupt: | |
340 | pass |
|
340 | pass | |
341 |
|
341 | |||
342 | def print_stack_entry(self,frame_lineno, prompt_prefix='\n-> ', |
|
342 | def print_stack_entry(self, frame_lineno, prompt_prefix='\n-> ', | |
343 | context=None): |
|
343 | context=None): | |
344 | if context is None: |
|
344 | if context is None: | |
345 | context = self.context |
|
345 | context = self.context | |
@@ -349,7 +349,7 b' class Pdb(OldPdb):' | |||||
349 | raise ValueError("Context must be a positive integer") |
|
349 | raise ValueError("Context must be a positive integer") | |
350 | except (TypeError, ValueError): |
|
350 | except (TypeError, ValueError): | |
351 | raise ValueError("Context must be a positive integer") |
|
351 | raise ValueError("Context must be a positive integer") | |
352 | print(self.format_stack_entry(frame_lineno, '', context)) |
|
352 | print(self.format_stack_entry(frame_lineno, '', context), file=self.stdout) | |
353 |
|
353 | |||
354 | # vds: >> |
|
354 | # vds: >> | |
355 | frame, lineno = frame_lineno |
|
355 | frame, lineno = frame_lineno | |
@@ -363,9 +363,9 b' class Pdb(OldPdb):' | |||||
363 | try: |
|
363 | try: | |
364 | context=int(context) |
|
364 | context=int(context) | |
365 | if context <= 0: |
|
365 | if context <= 0: | |
366 | print("Context must be a positive integer") |
|
366 | print("Context must be a positive integer", file=self.stdout) | |
367 | except (TypeError, ValueError): |
|
367 | except (TypeError, ValueError): | |
368 | print("Context must be a positive integer") |
|
368 | print("Context must be a positive integer", file=self.stdout) | |
369 | try: |
|
369 | try: | |
370 | import reprlib # Py 3 |
|
370 | import reprlib # Py 3 | |
371 | except ImportError: |
|
371 | except ImportError: | |
@@ -487,7 +487,7 b' class Pdb(OldPdb):' | |||||
487 | src.append(line) |
|
487 | src.append(line) | |
488 | self.lineno = lineno |
|
488 | self.lineno = lineno | |
489 |
|
489 | |||
490 | print(''.join(src)) |
|
490 | print(''.join(src), file=self.stdout) | |
491 |
|
491 | |||
492 | except KeyboardInterrupt: |
|
492 | except KeyboardInterrupt: | |
493 | pass |
|
493 | pass | |
@@ -510,7 +510,7 b' class Pdb(OldPdb):' | |||||
510 | else: |
|
510 | else: | |
511 | first = max(1, int(x) - 5) |
|
511 | first = max(1, int(x) - 5) | |
512 | except: |
|
512 | except: | |
513 | print('*** Error in argument:', repr(arg)) |
|
513 | print('*** Error in argument:', repr(arg), file=self.stdout) | |
514 | return |
|
514 | return | |
515 | elif self.lineno is None: |
|
515 | elif self.lineno is None: | |
516 | first = max(1, self.curframe.f_lineno - 5) |
|
516 | first = max(1, self.curframe.f_lineno - 5) |
General Comments 0
You need to be logged in to leave comments.
Login now