[Zodb-checkins] CVS: ZODB3/ZODB - FileStorage.py:1.105
Guido van Rossum
guido@python.org
Sat, 28 Sep 2002 23:40:38 -0400
Update of /cvs-repository/ZODB3/ZODB
In directory cvs.zope.org:/tmp/cvs-serv29001
Modified Files:
FileStorage.py
Log Message:
Be consistent in how FileStorageError is raised: with name, in
read_index(); with file.name, in FileIterator.__init__(). The latter
one found by pychecker; the former by grepping for FileStorageError.
=== ZODB3/ZODB/FileStorage.py 1.104 => 1.105 ===
--- ZODB3/ZODB/FileStorage.py:1.104 Sat Sep 28 23:36:09 2002
+++ ZODB3/ZODB/FileStorage.py Sat Sep 28 23:40:37 2002
@@ -1940,7 +1940,7 @@
file_size=file.tell()
if file_size:
- if file_size < start: raise FileStorageFormatError, file.name
+ if file_size < start: raise FileStorageFormatError, name
seek(0)
if read(4) != packed_version: raise FileStorageFormatError, name
else:
@@ -2172,7 +2172,7 @@
file = open(file, 'rb')
self._file = file
if file.read(4) != packed_version:
- raise FileStorageFormatError, name
+ raise FileStorageFormatError, file.name
file.seek(0,2)
self._file_size = file.tell()
self._pos = 4L