Skip to content

Commit 9bac4e0

Browse files
committed
__exit__() returns True to raise the exception
1 parent 2aff9dd commit 9bac4e0

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/namedpipe/_posix.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ def __enter__(self):
113113

114114
def __exit__(self, *_):
115115
self.close()
116+
return True
116117

117118
def readable(self)->bool:
118119
"""True if pipe's stream is readable"""

src/namedpipe/_win32.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ def __enter__(self):
165165

166166
def __exit__(self, *_):
167167
self.close()
168+
return True
168169

169170
def readable(self) -> bool:
170171
"""True if pipe's stream is readable"""

0 commit comments

Comments
 (0)