(try_iter, except_iter)
| 104 | |
| 105 | |
| 106 | def _try_except_permissionerror_iter(try_iter, except_iter): |
| 107 | if sys.version_info >= (3, 3): |
| 108 | try: |
| 109 | for x in try_iter(): |
| 110 | yield x |
| 111 | except PermissionError as exc: |
| 112 | for x in except_iter(exc): |
| 113 | yield x |
| 114 | else: |
| 115 | try: |
| 116 | for x in try_iter(): |
| 117 | yield x |
| 118 | except EnvironmentError as exc: |
| 119 | if exc.errno not in (EPERM, EACCES): |
| 120 | raise |
| 121 | else: |
| 122 | for x in except_iter(exc): |
| 123 | yield x |
| 124 | |
| 125 | |
| 126 | def _win32_get_unique_path_id(path): |
no outgoing calls
no test coverage detected