MCPcopy Index your code
hub / github.com/cool-RR/PySnooper / _try_except_permissionerror_iter

Function _try_except_permissionerror_iter

tests/mini_toolbox/pathlib.py:106–123  ·  view source on GitHub ↗
(try_iter, except_iter)

Source from the content-addressed store, hash-verified

104
105
106def _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
126def _win32_get_unique_path_id(path):

Callers 4

_select_fromMethod · 0.85
_select_fromMethod · 0.85
_iterate_directoriesMethod · 0.85
_select_fromMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected