()
| 10 | |
| 11 | |
| 12 | def gen_error_access_denied(): |
| 13 | if library.python.windows.on_win(): |
| 14 | err = WindowsError() |
| 15 | err.errno = errno.EACCES |
| 16 | err.strerror = '' |
| 17 | err.winerror = library.python.windows.ERRORS['ACCESS_DENIED'] |
| 18 | else: |
| 19 | err = OSError() |
| 20 | err.errno = errno.EACCES |
| 21 | err.strerror = os.strerror(err.errno) |
| 22 | err.filename = 'unknown/file' |
| 23 | raise err |
| 24 | |
| 25 | |
| 26 | def test_errorfix_buggy(): |