From 53c6fe95a8e31093ced0056c104ef6174e475390 Mon Sep 17 00:00:00 2001 From: Sagi Shnaidman Date: Tue, 29 Jan 2019 11:10:33 +0200 Subject: [PATCH] Import auth with try/except To make it pass python2/3 linters and fix OVB stack creating. Change-Id: I6994f2f31cf16b9ccd73e8d92c029ff0789c54c1 Related-Bug: 1815660 --- openstack_virtual_baremetal/deploy.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openstack_virtual_baremetal/deploy.py b/openstack_virtual_baremetal/deploy.py index 0cb72ec..53bcfa1 100755 --- a/openstack_virtual_baremetal/deploy.py +++ b/openstack_virtual_baremetal/deploy.py @@ -22,7 +22,11 @@ import yaml from heatclient.common import template_utils import os_client_config -from openstack_virtual_baremetal import auth +# TODO(sshnaidm): To make this python3 friendly with relative imports +try: + from openstack_virtual_baremetal import auth +except ImportError: + import auth def _parse_args():