diff options
| author | Andrey <lopsin232@gmail.com> | 2026-11-24 16:58:39 +0300 |
|---|---|---|
| committer | Andrey <lopsin232@gmail.com> | 2026-11-24 16:58:39 +0300 |
| commit | a6ff1f4d3265b18c1c26bdb1bfd63d109868bba2 (patch) | |
| tree | ee26ef88f8a39d1fe501c6604873cd2b40883534 /tools/rtti_scan.py | |
| parent | 47c6511747c93aa3fb908d7782ca96173d0eead3 (diff) | |
rtti_scan: restore write mode before unlink on replace failure (RTTI-SCAN-STAGE-CLEANUP)
agent: yes
AI-assisted: yes
Diffstat (limited to 'tools/rtti_scan.py')
| -rw-r--r-- | tools/rtti_scan.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/rtti_scan.py b/tools/rtti_scan.py index 9082b2f6d..8f3ebb7f2 100644 --- a/tools/rtti_scan.py +++ b/tools/rtti_scan.py | |||
| @@ -500,6 +500,10 @@ def write_report(path, text): | |||
| 500 | except BaseException: | 500 | except BaseException: |
| 501 | if tmp is not None: | 501 | if tmp is not None: |
| 502 | try: | 502 | try: |
| 503 | os.chmod(tmp, 0o600) | ||
| 504 | except OSError: | ||
| 505 | pass | ||
| 506 | try: | ||
| 503 | os.remove(tmp) | 507 | os.remove(tmp) |
| 504 | except OSError: | 508 | except OSError: |
| 505 | pass | 509 | pass |