(filename: str)
| 54 | |
| 55 | |
| 56 | def is_our_script(filename: str) -> bool: |
| 57 | if not os.path.exists(filename): # pragma: win32 no cover (symlink) |
| 58 | return False |
| 59 | with open(filename, 'rb') as f: |
| 60 | contents = f.read() |
| 61 | return any(h in contents for h in (CURRENT_HASH,) + PRIOR_HASHES) |
| 62 | |
| 63 | |
| 64 | def _install_hook_script( |