[ZODB-Dev] Typechecking oid in getitem

Christian Reis kiko at async.com.br
Thu May 22 16:30:52 EDT 2003


Checked in a slighly modified version of this change, thanks Toby and
Jeremy.

On Mon, May 19, 2003 at 02:38:17PM -0300, Christian Reis wrote:
> Index: FileStorage.py
> ===================================================================
> RCS file: /cvs-repository/ZODB3/ZODB/FileStorage.py,v
> retrieving revision 1.132
> diff -u -r1.132 FileStorage.py
> --- FileStorage.py	16 May 2003 20:19:15 -0000	1.132
> +++ FileStorage.py	19 May 2003 17:37:37 -0000
> @@ -595,6 +595,8 @@
>              pos=_index[oid]
>          except KeyError:
>              raise POSKeyError(oid)
> +        except TypeError:
> +            raise TypeError('malformatted oid %r' % (oid,))
>          file.seek(pos)
>          read=file.read
>          h=read(DATA_HDR_LEN)

[snip]

Take care,
--
Christian Reis, Senior Engineer, Async Open Source, Brazil.
http://async.com.br/~kiko/ | [+55 16] 261 2331 | NMFL



More information about the ZODB-Dev mailing list