summaryrefslogtreecommitdiff
path: root/Lib/chunk.py
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-05-11 19:14:51 +0000
committerFred Drake <fdrake@acm.org>2001-05-11 19:14:51 +0000
commitd04037ef9b52e648fd6775f0e92c481a63953d8d (patch)
tree7654620226044a850f87b6cdd2ed9a5d846728f2 /Lib/chunk.py
parent0e81f9fef38ccdb0ddc5657391ce2ad321386861 (diff)
downloadcpython-d04037ef9b52e648fd6775f0e92c481a63953d8d.tar.gz
Clean up bare except: when determining whether a file is seekable.
Diffstat (limited to 'Lib/chunk.py')
-rw-r--r--Lib/chunk.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/chunk.py b/Lib/chunk.py
index 8116256c15..1dc4a77a98 100644
--- a/Lib/chunk.py
+++ b/Lib/chunk.py
@@ -70,7 +70,7 @@ class Chunk:
self.size_read = 0
try:
self.offset = self.file.tell()
- except:
+ except (AttributeError, IOError):
self.seekable = 0
else:
self.seekable = 1
@@ -158,7 +158,7 @@ class Chunk:
self.file.seek(n, 1)
self.size_read = self.size_read + n
return
- except:
+ except IOError:
pass
while self.size_read < self.chunksize:
n = min(8192, self.chunksize - self.size_read)