680 ] = False |
680 ] = False |
681 return False |
681 return False |
682 |
682 |
683 try: |
683 try: |
684 lineNumbers = [ |
684 lineNumbers = [ |
685 l for _, _, l in frame.f_code.co_lines() if l is not None |
685 line for _, _, line in frame.f_code.co_lines() if line is not None |
686 ] |
686 ] |
687 except AttributeError: |
687 except AttributeError: |
688 # backward compatibility code for Python 3.10 and below |
688 # backward compatibility code for Python 3.10 and below |
689 lineNo = frame.f_code.co_firstlineno |
689 lineNo = frame.f_code.co_firstlineno |
690 lineNumbers = [lineNo] |
690 lineNumbers = [lineNo] |
824 fargs = "" |
824 fargs = "" |
825 |
825 |
826 stack.append([fname, fline, ffunc, fargs]) |
826 stack.append([fname, fline, ffunc, fargs]) |
827 |
827 |
828 # is it a stack frame or exception list? |
828 # is it a stack frame or exception list? |
829 if type(frame) is list: |
829 if isinstance(frame, list): |
830 if frame != []: |
830 if frame != []: |
831 fr, tb_lineno = frame.pop(0) |
831 fr, tb_lineno = frame.pop(0) |
832 else: |
832 else: |
833 fr = None |
833 fr = None |
834 else: |
834 else: |