summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-09-25 17:22:12 +0000
committerGerrit Code Review <review@openstack.org>2018-09-25 17:22:12 +0000
commit683d52042cf01ecaabc764f0b0aab6b7ec7a5d67 (patch)
treec68cfaabc488dc85e4d55fadcfa62214df2bdb0e
parent51705e3d288a758beb81d041c67a2c975e8f8b84 (diff)
parent1558b869ffc5c4f67299a9964ea7b8be7546bcc5 (diff)
Merge "Allow Iotronic-Api to run in python2.7"0.3.5
-rw-r--r--iotronic/conductor/endpoints.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/iotronic/conductor/endpoints.py b/iotronic/conductor/endpoints.py
index 302f0ad..dfbe99b 100644
--- a/iotronic/conductor/endpoints.py
+++ b/iotronic/conductor/endpoints.py
@@ -13,7 +13,14 @@
13# License for the specific language governing permissions and limitations 13# License for the specific language governing permissions and limitations
14# under the License. 14# under the License.
15 15
16import _pickle as cpickle 16
17try:
18 # allow iotronic api to run also with python3
19 import _pickle as cpickle
20except Exception:
21 # allow iotronic api to run also with python2.7
22 import pickle as cpickle
23
17from iotronic.common import exception 24from iotronic.common import exception
18from iotronic.common import neutron 25from iotronic.common import neutron
19from iotronic.common import states 26from iotronic.common import states