Merge pull request #47494 from ejparker12/fix-lxc-clone

Fixed lxc.clone unhandled exception in salt/modules/lxc.py
This commit is contained in:
Nicole Thomas 2018-05-07 15:03:58 -04:00 committed by GitHub
commit 3cc7d3ae7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2077,7 +2077,7 @@ def clone(name,
if backing in ('dir', 'overlayfs', 'btrfs'):
size = None
# LXC commands and options changed in 2.0 - CF issue #34086 for details
if version() >= _LooseVersion('2.0'):
if _LooseVersion(version()) >= _LooseVersion('2.0'):
# https://linuxcontainers.org/lxc/manpages//man1/lxc-copy.1.html
cmd = 'lxc-copy'
cmd += ' {0} -n {1} -N {2}'.format(snapshot, orig, name)