[gnuoy,trivial] Pre-release charmhelper sync to pickup leadership election peer migration fix
This commit is contained in:
parent
46dda298c8
commit
dad203ed1e
@ -34,7 +34,22 @@ import errno
|
||||
import tempfile
|
||||
from subprocess import CalledProcessError
|
||||
|
||||
from charmhelpers.cli import cmdline
|
||||
try:
|
||||
from charmhelpers.cli import cmdline
|
||||
except ImportError as e:
|
||||
# due to the anti-pattern of partially synching charmhelpers directly
|
||||
# into charms, it's possible that charmhelpers.cli is not available;
|
||||
# if that's the case, they don't really care about using the cli anyway,
|
||||
# so mock it out
|
||||
if str(e) == 'No module named cli':
|
||||
class cmdline(object):
|
||||
@classmethod
|
||||
def subcommand(cls, *args, **kwargs):
|
||||
def _wrap(func):
|
||||
return func
|
||||
return _wrap
|
||||
else:
|
||||
raise
|
||||
|
||||
import six
|
||||
if not six.PY3:
|
||||
|
Loading…
Reference in New Issue
Block a user