Show More
@@ -220,8 +220,8 b' class Pdb(OldPdb):' | |||||
220 | self.context = int(context) |
|
220 | self.context = int(context) | |
221 | if self.context <= 0: |
|
221 | if self.context <= 0: | |
222 | raise ValueError("Context must be a positive integer") |
|
222 | raise ValueError("Context must be a positive integer") | |
223 | except (TypeError, ValueError): |
|
223 | except (TypeError, ValueError) as e: | |
224 | raise ValueError("Context must be a positive integer") |
|
224 | raise ValueError("Context must be a positive integer") from e | |
225 |
|
225 | |||
226 | # `kwargs` ensures full compatibility with stdlib's `pdb.Pdb`. |
|
226 | # `kwargs` ensures full compatibility with stdlib's `pdb.Pdb`. | |
227 | OldPdb.__init__(self, completekey, stdin, stdout, **kwargs) |
|
227 | OldPdb.__init__(self, completekey, stdin, stdout, **kwargs) | |
@@ -326,8 +326,8 b' class Pdb(OldPdb):' | |||||
326 | context=int(context) |
|
326 | context=int(context) | |
327 | if context <= 0: |
|
327 | if context <= 0: | |
328 | raise ValueError("Context must be a positive integer") |
|
328 | raise ValueError("Context must be a positive integer") | |
329 | except (TypeError, ValueError): |
|
329 | except (TypeError, ValueError) as e: | |
330 | raise ValueError("Context must be a positive integer") |
|
330 | raise ValueError("Context must be a positive integer") from e | |
331 | try: |
|
331 | try: | |
332 | for frame_lineno in self.stack: |
|
332 | for frame_lineno in self.stack: | |
333 | self.print_stack_entry(frame_lineno, context=context) |
|
333 | self.print_stack_entry(frame_lineno, context=context) | |
@@ -342,8 +342,8 b' class Pdb(OldPdb):' | |||||
342 | context=int(context) |
|
342 | context=int(context) | |
343 | if context <= 0: |
|
343 | if context <= 0: | |
344 | raise ValueError("Context must be a positive integer") |
|
344 | raise ValueError("Context must be a positive integer") | |
345 | except (TypeError, ValueError): |
|
345 | except (TypeError, ValueError) as e: | |
346 | raise ValueError("Context must be a positive integer") |
|
346 | raise ValueError("Context must be a positive integer") from e | |
347 | print(self.format_stack_entry(frame_lineno, '', context), file=self.stdout) |
|
347 | print(self.format_stack_entry(frame_lineno, '', context), file=self.stdout) | |
348 |
|
348 | |||
349 | # vds: >> |
|
349 | # vds: >> |
General Comments 0
You need to be logged in to leave comments.
Login now