MCPcopy Index your code
hub / github.com/python/cpython / _save_initial_file_mtime

Method _save_initial_file_mtime

Lib/pdb.py:640–650  ·  view source on GitHub ↗

save the mtime of the all the files in the frame stack in the file mtime table if they haven't been saved yet.

(self, frame)

Source from the content-addressed store, hash-verified

638 self.message('--KeyboardInterrupt--')
639
640 def _save_initial_file_mtime(self, frame):
641 """save the mtime of the all the files in the frame stack in the file mtime table
642 if they haven't been saved yet."""
643 while frame:
644 filename = frame.f_code.co_filename
645 if filename not in self._file_mtime_table:
646 try:
647 self._file_mtime_table[filename] = os.path.getmtime(filename)
648 except Exception:
649 pass
650 frame = frame.f_back
651
652 def _validate_file_mtime(self):
653 """Check if the source file of the current frame has been modified.

Callers 1

setupMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected