We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 08eb763 commit 14cf511Copy full SHA for 14cf511
gridfs/errors.py
@@ -14,7 +14,16 @@
14
15
"""Exceptions raised by the :mod:`gridfs` package"""
16
17
-class CorruptGridFile(Exception):
+from pymongo.errors import PyMongoError
18
+
19
20
+class GridFSError(PyMongoError):
21
+ """Base class for all GridFS exceptions.
22
23
+ .. versionadded:: 1.4+
24
+ """
25
26
+class CorruptGridFile(GridFSError):
27
"""Raised when a :class:`~gridfs.grid_file.GridFile` instance is
28
malformed.
29
"""
pymongo/objectid.py
@@ -20,7 +20,7 @@
try:
import hashlib
_md5func = hashlib.md5
-except: # for Python < 2.5
+except ImportError: # for Python < 2.5
import md5
_md5func = md5.new
import os
0 commit comments