Convert the charm to Python 3

Change-Id: I8c8df27be189098be363d0ea125f86e59fdbb020
This commit is contained in:
Alex Kavanagh 2019-03-13 12:29:17 +00:00
parent 07163a4b0d
commit 7ea0be57de
108 changed files with 55 additions and 20 deletions

View File

@ -1,4 +1,3 @@
- project:
templates:
- python-charm-jobs
- openstack-python35-jobs-nonvoting
- python35-charm-jobs

View File

@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python3
#
# Copyright 2016 Canonical Ltd
#
@ -17,7 +17,19 @@
import os
import sys
sys.path.append('hooks/')
_path = os.path.dirname(os.path.realpath(__file__))
_hooks = os.path.abspath(os.path.join(_path, '../hooks'))
_root = os.path.abspath(os.path.join(_path, '..'))
def _add_path(path):
if path not in sys.path:
sys.path.insert(1, path)
_add_path(_hooks)
_add_path(_root)
from charmhelpers.core.hookenv import action_fail
from ceilometer_utils import (

View File

@ -1,5 +1,5 @@
repo: https://github.com/juju/charm-helpers
destination: hooks/charmhelpers
destination: charmhelpers
include:
- core
- osplatform

Some files were not shown because too many files have changed in this diff Show More