summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Verboso <fverboso@unime.it>2018-09-14 15:49:43 +0200
committerFabio Verboso <fverboso@unime.it>2018-09-14 15:49:43 +0200
commit1558b869ffc5c4f67299a9964ea7b8be7546bcc5 (patch)
tree14e8c58b43a7adb8e30af73137a1344ffed416f4
parentea3b97693a664080279f5ee7625567deef378efd (diff)
Allow Iotronic-Api to run in python2.7
Notes
Notes (review): Code-Review+2: Fabio Verboso <fverboso@unime.it> Workflow+1: Fabio Verboso <fverboso@unime.it> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Tue, 25 Sep 2018 17:22:12 +0000 Reviewed-on: https://review.openstack.org/605055 Project: openstack/iotronic Branch: refs/heads/master
-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 fa2a865..e019b6a 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