equal
deleted
inserted
replaced
47 continue |
47 continue |
48 |
48 |
49 frame = tb.tb_frame |
49 frame = tb.tb_frame |
50 |
50 |
51 try: |
51 try: |
52 with open(inspect.getsourcefile(tb), 'r') as fh: |
52 with open(inspect.getsourcefile(tb)) as fh: |
53 hgline = fh.readlines()[frame.f_lineno - 1].strip() |
53 hgline = fh.readlines()[frame.f_lineno - 1].strip() |
54 except (IndexError, OSError): |
54 except (IndexError, OSError): |
55 pass |
55 pass |
56 |
56 |
57 hgframe = '%s:%d' % (frame.f_code.co_filename, frame.f_lineno) |
57 hgframe = '%s:%d' % (frame.f_code.co_filename, frame.f_lineno) |