Add __init__.py to charmhelpers sync & perform sync to get fix for recent charmhelpers break

This commit is contained in:
Liam Young 2014-12-01 17:35:21 +00:00
parent 0d2230ab82
commit 144a6ffbe5
2 changed files with 23 additions and 0 deletions

View File

@ -1,6 +1,7 @@
branch: lp:charm-helpers
destination: hooks/charmhelpers
include:
- __init__
- core
- fetch
- contrib.storage.linux:

View File

@ -0,0 +1,22 @@
# Bootstrap charm-helpers, installing its dependencies if necessary using
# only standard libraries.
import subprocess
import sys
try:
import six # flake8: noqa
except ImportError:
if sys.version_info.major == 2:
subprocess.check_call(['apt-get', 'install', '-y', 'python-six'])
else:
subprocess.check_call(['apt-get', 'install', '-y', 'python3-six'])
import six # flake8: noqa
try:
import yaml # flake8: noqa
except ImportError:
if sys.version_info.major == 2:
subprocess.check_call(['apt-get', 'install', '-y', 'python-yaml'])
else:
subprocess.check_call(['apt-get', 'install', '-y', 'python3-yaml'])
import yaml # flake8: noqa