# Pastebin 4RksW9n7 try: if self.cloud_config.get_api_version('image') == '2': endpoint = '/images' else: endpoint = '/images/detail' response = self._image_client.get(endpoint) except keystoneauth1.exceptions.catalog.EndpointNotFound: # We didn't have glance, let's try nova # If this doesn't work - we just let the exception propagate response = self._compute_client.get('/images/detail')