summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-05-11 19:14:51 (GMT)
committerFred Drake <fdrake@acm.org>2001-05-11 19:14:51 (GMT)
commit553f68114fadda312abdf1a62e298383dac81060 (patch)
tree0da905db5d270c79d0d7cffe65a6d89f70543e7c
parent776d39e2c7786ddef5df12b35582069fc94f3979 (diff)
downloadcpython-553f68114fadda312abdf1a62e298383dac81060.zip
cpython-553f68114fadda312abdf1a62e298383dac81060.tar.gz
cpython-553f68114fadda312abdf1a62e298383dac81060.tar.bz2
Clean up bare except: when determining whether a file is seekable.
-rw-r--r--Lib/chunk.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/chunk.py b/Lib/chunk.py
index 8116256..1dc4a77 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)