From 3efdd97c2e3e3af3b9c74e6ab217fd57088e9dfa Mon Sep 17 00:00:00 2001 From: Elrond Date: Mon, 20 Jun 2011 00:09:40 +0200 Subject: [PATCH] Move InvalidId to db.util Instead of import InvalidId from the low level bson module, first import it in our db.util wrapper and second import it from pymongo.errors. --- mediagoblin/db/util.py | 1 + mediagoblin/decorators.py | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mediagoblin/db/util.py b/mediagoblin/db/util.py index 30615fca..470da531 100644 --- a/mediagoblin/db/util.py +++ b/mediagoblin/db/util.py @@ -17,4 +17,5 @@ # Imports that other modules might use from pymongo import DESCENDING +from pymongo.errors import InvalidId from mongokit import ObjectId diff --git a/mediagoblin/decorators.py b/mediagoblin/decorators.py index c2fe3f9f..081eda62 100644 --- a/mediagoblin/decorators.py +++ b/mediagoblin/decorators.py @@ -15,11 +15,10 @@ # along with this program. If not, see . -from bson.errors import InvalidId from webob import exc from mediagoblin.util import redirect -from mediagoblin.db.util import ObjectId +from mediagoblin.db.util import ObjectId, InvalidId def _make_safe(decorator, original): -- 2.25.1