From 430da30e018c4cf483b8b280880c569d15531712 Mon Sep 17 00:00:00 2001 From: Taha Jahangir Date: Wed, 22 Oct 2014 11:08:47 +0330 Subject: [PATCH] Catch SkipTest exception when couchdb is not installed --- pyramid_formalchemy/views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyramid_formalchemy/views.py b/pyramid_formalchemy/views.py index 846b6c9..c27a374 100644 --- a/pyramid_formalchemy/views.py +++ b/pyramid_formalchemy/views.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +from unittest import SkipTest import zope.component.event from zope.interface import alsoProvides from webhelpers.paginate import Page @@ -21,7 +22,8 @@ try: from formalchemy.ext.couchdb import Document -except ImportError: + # formalchemy >1.5 raises SkipTest when couchdb is not exists +except (ImportError, SkipTest): Document = None try: