Clean up bare except: when determining whether a file is seekable.

This commit is contained in:
Fred Drake 2001-05-11 19:14:51 +00:00
parent 776d39e2c7
commit 553f68114f
1 changed files with 2 additions and 2 deletions

View File

@ -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)