From f0c5dd1bce63f7ce3c7cdbcba33a4bc367674e3c Mon Sep 17 00:00:00 2001 From: Viktor Kerkez Date: Sat, 23 Oct 2010 22:33:03 +0200 Subject: [PATCH] Small fix for Python 2.5 --- .gitignore | 4 +++- mongoengine/base.py | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 51a9ca1d..d2927298 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,6 @@ docs/_build build/ dist/ mongoengine.egg-info/ -env/ \ No newline at end of file +env/ +.project +.pydevproject \ No newline at end of file diff --git a/mongoengine/base.py b/mongoengine/base.py index 6b74cb07..ac15df6f 100644 --- a/mongoengine/base.py +++ b/mongoengine/base.py @@ -491,6 +491,7 @@ class BaseDocument(object): if sys.version_info < (2, 5): # Prior to Python 2.5, Exception was an old-style class + import types def subclass_exception(name, parents, unused): return types.ClassType(name, parents, {}) else: