Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1e73dbb

Browse files
DimitrisJimambv
authored andcommitted
Fix small exception typos in Lib (#818)
1 parent f8beb98 commit 1e73dbb

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

Lib/_pyio.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,7 @@ def truncate(self, pos=None):
766766

767767
def flush(self):
768768
if self.closed:
769-
raise ValueError("flush of closed file")
769+
raise ValueError("flush on closed file")
770770
self.raw.flush()
771771

772772
def close(self):
@@ -1214,7 +1214,7 @@ def flush(self):
12141214

12151215
def _flush_unlocked(self):
12161216
if self.closed:
1217-
raise ValueError("flush of closed file")
1217+
raise ValueError("flush on closed file")
12181218
while self._write_buf:
12191219
try:
12201220
n = self.raw.write(self._write_buf)

Lib/asyncio/windows_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def handle(self):
149149

150150
def fileno(self):
151151
if self._handle is None:
152-
raise ValueError("I/O operatioon on closed pipe")
152+
raise ValueError("I/O operation on closed pipe")
153153
return self._handle
154154

155155
def close(self, *, CloseHandle=_winapi.CloseHandle):

0 commit comments

Comments
 (0)