Call linecache.checkcache() safely protecting our cached values.
(*args)
| 151 | |
| 152 | |
| 153 | def check_linecache_ipython(*args): |
| 154 | """Call linecache.checkcache() safely protecting our cached values. |
| 155 | """ |
| 156 | # First call the original checkcache as intended |
| 157 | linecache._checkcache_ori(*args) |
| 158 | # Then, update back the cache with our data, so that tracebacks related |
| 159 | # to our compiled codes can be produced. |
| 160 | linecache.cache.update(linecache._ipython_cache) |