Move line of code to ensure context and client stay in sync
If the barbican_client.Client() throws an exception, then
self._current_context will not match self._barbican_client.
This fix moves a line of code down to ensure they will match.
Change-Id: I4e6291d98d9b2d37b3d5063b9b20fbb093d254d4
Closes-bug: #1523646
Dave McCowan
8 years ago
109 | 109 | return self._barbican_client |
110 | 110 | |
111 | 111 | try: |
112 | self._current_context = context | |
113 | 112 | auth = self._get_keystone_auth(context) |
114 | 113 | sess = session.Session(auth=auth) |
115 | 114 | |
117 | 116 | self._barbican_client = barbican_client.Client( |
118 | 117 | session=sess, |
119 | 118 | endpoint=self._barbican_endpoint) |
119 | self._current_context = context | |
120 | 120 | |
121 | 121 | except Exception as e: |
122 | 122 | LOG.error(u._LE("Error creating Barbican client: %s"), e) |