Importing from trove-client compat first
- Switched the logic so that the compat version is imported first Fixes bug #1250237 Change-Id: I7650fc6c3ce93164ca8bee610d5fe2293df3ecc7
This commit is contained in:
parent
e543879af6
commit
0f9617cb55
@ -17,13 +17,13 @@
|
|||||||
from django.conf import settings # noqa
|
from django.conf import settings # noqa
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from troveclient import auth
|
from troveclient.compat import auth
|
||||||
from troveclient import client
|
from troveclient.compat import client
|
||||||
with_trove = True
|
with_trove = True
|
||||||
except ImportError:
|
except ImportError:
|
||||||
try:
|
try:
|
||||||
from troveclient.compat import auth
|
from troveclient import auth
|
||||||
from troveclient.compat import client
|
from troveclient import client
|
||||||
with_trove = True
|
with_trove = True
|
||||||
except ImportError:
|
except ImportError:
|
||||||
with_trove = False
|
with_trove = False
|
||||||
|
@ -25,10 +25,10 @@ from openstack_dashboard.test import helpers as test
|
|||||||
|
|
||||||
if api.trove.with_trove:
|
if api.trove.with_trove:
|
||||||
try:
|
try:
|
||||||
from troveclient import common
|
from troveclient.compat import common
|
||||||
except ImportError:
|
except ImportError:
|
||||||
try:
|
try:
|
||||||
from troveclient.compat import common
|
from troveclient import common
|
||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -26,11 +26,11 @@ from neutronclient.common import exceptions as neutronclient
|
|||||||
from novaclient import exceptions as novaclient
|
from novaclient import exceptions as novaclient
|
||||||
from swiftclient import client as swiftclient
|
from swiftclient import client as swiftclient
|
||||||
try:
|
try:
|
||||||
from troveclient import exceptions as troveclient
|
from troveclient.compat import exceptions as troveclient
|
||||||
with_trove = True
|
with_trove = True
|
||||||
except ImportError:
|
except ImportError:
|
||||||
try:
|
try:
|
||||||
from troveclient.compat import exceptions as troveclient
|
from troveclient import exceptions as troveclient
|
||||||
with_trove = True
|
with_trove = True
|
||||||
except ImportError:
|
except ImportError:
|
||||||
with_trove = False
|
with_trove = False
|
||||||
|
@ -39,11 +39,11 @@ from neutronclient.v2_0 import client as neutron_client
|
|||||||
from novaclient.v1_1 import client as nova_client
|
from novaclient.v1_1 import client as nova_client
|
||||||
from swiftclient import client as swift_client
|
from swiftclient import client as swift_client
|
||||||
try:
|
try:
|
||||||
from troveclient import client as trove_client
|
from troveclient.compat import client as trove_client
|
||||||
with_trove = True
|
with_trove = True
|
||||||
except ImportError:
|
except ImportError:
|
||||||
try:
|
try:
|
||||||
from troveclient.compat import client as trove_client
|
from troveclient import client as trove_client
|
||||||
with_trove = True
|
with_trove = True
|
||||||
except ImportError:
|
except ImportError:
|
||||||
with_trove = False
|
with_trove = False
|
||||||
|
@ -20,11 +20,11 @@ from neutronclient.common import exceptions as neutron_exceptions
|
|||||||
from novaclient import exceptions as nova_exceptions
|
from novaclient import exceptions as nova_exceptions
|
||||||
from swiftclient import client as swift_exceptions
|
from swiftclient import client as swift_exceptions
|
||||||
try:
|
try:
|
||||||
from troveclient import exceptions as trove_exceptions
|
from troveclient.compat import exceptions as trove_exceptions
|
||||||
with_trove = True
|
with_trove = True
|
||||||
except ImportError:
|
except ImportError:
|
||||||
try:
|
try:
|
||||||
from troveclient.compat import exceptions as trove_exceptions
|
from troveclient import exceptions as trove_exceptions
|
||||||
with_trove = True
|
with_trove = True
|
||||||
except ImportError:
|
except ImportError:
|
||||||
with_trove = False
|
with_trove = False
|
||||||
|
@ -15,13 +15,13 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from troveclient import backups
|
from troveclient.v1 import backups
|
||||||
from troveclient import instances
|
from troveclient.v1 import instances
|
||||||
with_trove = True
|
with_trove = True
|
||||||
except ImportError:
|
except ImportError:
|
||||||
try:
|
try:
|
||||||
from troveclient.v1 import backups
|
from troveclient import backups
|
||||||
from troveclient.v1 import instances
|
from troveclient import instances
|
||||||
with_trove = True
|
with_trove = True
|
||||||
except ImportError:
|
except ImportError:
|
||||||
with_trove = False
|
with_trove = False
|
||||||
|
Loading…
x
Reference in New Issue
Block a user