Log appropriate error while exception

Currently while any exception during creating Client object, generic
log 'Not Authorized' was logged which hides the actual error. This
patch fixes the issue by logging in the actual error message.

Change-Id: I1891ee0cf3d1c58fc922792300a48d9ab95a634b
Closes-bug: #1597469
This commit is contained in:
Madhuri Kumari 2016-06-30 00:02:19 +05:30
parent 72742fb3eb
commit 2116043961

View File

@ -112,10 +112,10 @@ class Client(object):
service_name=service_name,
interface=interface,
region_name=region_name)
except Exception:
raise RuntimeError("Not Authorized")
except Exception:
raise RuntimeError("Not Authorized")
except Exception as e:
raise RuntimeError(str(e))
except Exception as e:
raise RuntimeError(str(e))
self.http_client = httpclient.SessionClient(
service_type=service_type,