From: Steven Dake Date: Wed, 12 Sep 2012 15:11:30 +0000 (-0700) Subject: Make S3 import except on ImportError rather then all exceptions X-Git-Tag: 2014.1~1433^2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=8da4ddf51fedefdb1601baf7359e128f22f396e2;p=openstack-build%2Fheat-build.git Make S3 import except on ImportError rather then all exceptions Change-Id: Icb98aed65ccba825f8402fdde95ac38b2a12c1a6 Signed-off-by: Steven Dake --- diff --git a/heat/engine/resources.py b/heat/engine/resources.py index 428cd736..46717af3 100644 --- a/heat/engine/resources.py +++ b/heat/engine/resources.py @@ -24,7 +24,7 @@ from keystoneclient.v2_0 import client as kc try: from swiftclient import client as swiftclient swiftclient_present = True -except: +except ImportError: swiftclient_present = False from heat.common import exception diff --git a/heat/engine/s3.py b/heat/engine/s3.py index 7a181635..f266f93d 100644 --- a/heat/engine/s3.py +++ b/heat/engine/s3.py @@ -23,7 +23,7 @@ from heat.openstack.common import log as logging try: from swiftclient.client import ClientException swiftclient_present = True -except: +except ImportError: swiftclient_present = False logger = logging.getLogger('heat.engine.s3')