From 7c21f706e5669625e99de251d4873cc31ba7cda1 Mon Sep 17 00:00:00 2001 From: Roman Mogilatov Date: Sat, 14 Mar 2015 00:02:59 +0200 Subject: [PATCH] fixing issue with AttributeError that has been replaced with objects.errors.Error --- examples/usage.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/usage.py b/examples/usage.py index 2cc9bfa1..7f57b3bb 100644 --- a/examples/usage.py +++ b/examples/usage.py @@ -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')