diff options
author | Collin Winter <collinw@gmail.com> | 2007-08-30 01:19:48 (GMT) |
---|---|---|
committer | Collin Winter <collinw@gmail.com> | 2007-08-30 01:19:48 (GMT) |
commit | ce36ad8a467d914eb5c91f33835b9eaea18ee93b (patch) | |
tree | 05bf654f3359e20b455dc300bd860bba5d291c8d /Lib/chunk.py | |
parent | 8b3febef2f96c35e9aad9db2ef499db040fdefae (diff) | |
download | cpython-ce36ad8a467d914eb5c91f33835b9eaea18ee93b.zip cpython-ce36ad8a467d914eb5c91f33835b9eaea18ee93b.tar.gz cpython-ce36ad8a467d914eb5c91f33835b9eaea18ee93b.tar.bz2 |
Raise statement normalization in Lib/.
Diffstat (limited to 'Lib/chunk.py')
-rw-r--r-- | Lib/chunk.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/chunk.py b/Lib/chunk.py index 32aada8..5863ed0 100644 --- a/Lib/chunk.py +++ b/Lib/chunk.py @@ -90,7 +90,7 @@ class Chunk: def isatty(self): if self.closed: - raise ValueError, "I/O operation on closed file" + raise ValueError("I/O operation on closed file") return False def seek(self, pos, whence=0): @@ -100,9 +100,9 @@ class Chunk: """ if self.closed: - raise ValueError, "I/O operation on closed file" + raise ValueError("I/O operation on closed file") if not self.seekable: - raise IOError, "cannot seek" + raise IOError("cannot seek") if whence == 1: pos = pos + self.size_read elif whence == 2: @@ -114,7 +114,7 @@ class Chunk: def tell(self): if self.closed: - raise ValueError, "I/O operation on closed file" + raise ValueError("I/O operation on closed file") return self.size_read def read(self, size=-1): @@ -124,7 +124,7 @@ class Chunk: """ if self.closed: - raise ValueError, "I/O operation on closed file" + raise ValueError("I/O operation on closed file") if self.size_read >= self.chunksize: return '' if size < 0: @@ -148,7 +148,7 @@ class Chunk: """ if self.closed: - raise ValueError, "I/O operation on closed file" + raise ValueError("I/O operation on closed file") if self.seekable: try: n = self.chunksize - self.size_read |