Calculate the mode permissions for a bytecode file.
(path)
| 379 | |
| 380 | |
| 381 | def _calc_mode(path): |
| 382 | """Calculate the mode permissions for a bytecode file.""" |
| 383 | try: |
| 384 | mode = _path_stat(path).st_mode |
| 385 | except OSError: |
| 386 | mode = 0o666 |
| 387 | # We always ensure write access so we can update cached files |
| 388 | # later even when the source files are read-only on Windows (#6074) |
| 389 | mode |= 0o200 |
| 390 | return mode |
| 391 | |
| 392 | |
| 393 | def _check_name(method): |
no test coverage detected