]> granicus.if.org Git - python/commitdiff
Fix small exception typos in Lib (#818)
authorJim Fasarakis-Hilliard <d.f.hilliard@gmail.com>
Sun, 26 Mar 2017 20:59:08 +0000 (23:59 +0300)
committerŁukasz Langa <lukasz@langa.pl>
Sun, 26 Mar 2017 20:59:08 +0000 (13:59 -0700)
Lib/_pyio.py
Lib/asyncio/windows_utils.py

index 8f9397660bcffdd6e15d862d947c68258a05fdda..5dfc1f0308d97b0b9b233ccf8c0827a14ded9115 100644 (file)
@@ -766,7 +766,7 @@ class _BufferedIOMixin(BufferedIOBase):
 
     def flush(self):
         if self.closed:
-            raise ValueError("flush of closed file")
+            raise ValueError("flush on closed file")
         self.raw.flush()
 
     def close(self):
@@ -1214,7 +1214,7 @@ class BufferedWriter(_BufferedIOMixin):
 
     def _flush_unlocked(self):
         if self.closed:
-            raise ValueError("flush of closed file")
+            raise ValueError("flush on closed file")
         while self._write_buf:
             try:
                 n = self.raw.write(self._write_buf)
index 7c63fb904b3bdd90b56d6c9b000d913d9653de0a..d65ea1790f078dd3dbb68979c979c95cdb571fae 100644 (file)
@@ -149,7 +149,7 @@ class PipeHandle:
 
     def fileno(self):
         if self._handle is None:
-            raise ValueError("I/O operatioon on closed pipe")
+            raise ValueError("I/O operation on closed pipe")
         return self._handle
 
     def close(self, *, CloseHandle=_winapi.CloseHandle):