Commits

Anonymous committed ec1a53c

BUG: Clear the linecache before getting lines.

Comments (0)

Files changed (1)

         nlines = max(linenos) - min(min(linenos), start_lineno) + 1
         sublines = [''] * nlines
     else:
+        # Clear the cache to ensure that we get up-to-date results.
+        linecache.clearcache()
         all_lines = linecache.getlines(filename)
         sublines = inspect.getblock(all_lines[start_lineno-1:])
     for lineno, nhits, time in timings: