Calculate the mode permissions for a bytecode file.
(path)
| 368 | |
| 369 | |
| 370 | def _calc_mode(path): |
| 371 | """Calculate the mode permissions for a bytecode file.""" |
| 372 | try: |
| 373 | mode = _path_stat(path).st_mode |
| 374 | except OSError: |
| 375 | mode = 0o666 |
| 376 | # We always ensure write access so we can update cached files |
| 377 | # later even when the source files are read-only on Windows (#6074) |
| 378 | mode |= 0o200 |
| 379 | return mode |
| 380 | |
| 381 | |
| 382 | def _check_name(method): |
no test coverage detected
searching dependent graphs…