Skip to content

Commit 16d8d9f

Browse files
committed
remove unused _copy_exc
1 parent 1c5bf53 commit 16d8d9f

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

trio_websocket/_impl.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -92,16 +92,6 @@ def __exit__(self, ty, value, tb):
9292
filtered_exception = _ignore_cancel(value)
9393
return filtered_exception is None
9494

95-
def copy_exc(e: BaseException) -> BaseException:
96-
"""Copy an exception.
97-
98-
`copy.copy` fails on `trio.Cancelled`, and on exceptions with a custom `__init__`
99-
that calls `super().__init__()`. It may be the case that this also fails on something.
100-
"""
101-
cls = type(e)
102-
result = cls.__new__(cls)
103-
result.__dict__ = copy.copy(e.__dict__)
104-
return result
10595

10696
@asynccontextmanager
10797
async def open_websocket(

0 commit comments

Comments
 (0)