From a4d0904c99cddb1d4fc5c0dcff272eb19eca4acb Mon Sep 17 00:00:00 2001 From: Mike Dirolf Date: Tue, 6 Jan 2009 16:32:11 -0500 Subject: [PATCH] starting from_sequence --- bson.py | 43 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 3 deletions(-) diff --git a/bson.py b/bson.py index d36397b52..5c9fe7669 100644 --- a/bson.py +++ b/bson.py @@ -14,6 +14,10 @@ class InvalidBSON(ValueError): """Raised when trying to create a BSON object from invalid data. """ +class InvalidDocument(ValueError): + """Raised when trying to create a BSON object from an invalid document. + """ + def _get_int(data): try: int = struct.unpack("