fixing issue with AttributeError that has been replaced with objects.errors.Error

This commit is contained in:
Roman Mogilatov 2015-03-14 00:02:59 +02:00
parent 6567ee2b4d
commit 7c21f706e5
1 changed files with 4 additions and 2 deletions

View File

@ -8,6 +8,8 @@ from objects.providers import NewInstance
from objects.injections import InitArg
from objects.injections import Attribute
from objects.errors import Error
import sqlite3
@ -72,7 +74,7 @@ class Consumer(object):
try:
self.dependencies.database()
except AttributeError:
except Error:
pass
else:
raise Exception('Database is not listed as a dependency')
@ -98,7 +100,7 @@ def consumer_callback(dependencies=Catalog(Catalog.object_a,
try:
dependencies.database()
except AttributeError:
except Error:
pass
else:
raise Exception('Database is not listed as a dependency')