From a7b2a1bff3762c94dd217caef515eba3561bec1e Mon Sep 17 00:00:00 2001 From: dlorenc Date: Mon, 27 Apr 2015 18:50:31 -0700 Subject: [PATCH] Change decorators to use a relative import. This is more consistent with the way the rest of the package imports errors. This also solves a crazy cyclical import issue I'm seeing. Signed-off-by: dlorenc --- docker/utils/decorators.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/utils/decorators.py b/docker/utils/decorators.py index 8d07f936e2..6f438249a6 100644 --- a/docker/utils/decorators.py +++ b/docker/utils/decorators.py @@ -1,4 +1,4 @@ -import docker.errors +from .. import errors def check_resource(f): @@ -6,7 +6,7 @@ def wrapped(self, resource_id=None, *args, **kwargs): if resource_id is None and ( kwargs.get('container') is None and kwargs.get('image') is None ): - raise docker.errors.NullResource( + raise errors.NullResource( 'image or container param is None' ) return f(self, resource_id, *args, **kwargs)