modules/lxc: more consistent comparsion

This commit is contained in:
Mathieu Le Marec - Pasquet 2015-05-22 20:29:18 +02:00
parent 07c365a23b
commit 27c4689a24

View file

@ -101,7 +101,7 @@ def version():
cversion = __salt__['cmd.run_all']('lxc-ls --version')
if not cversion['retcode']:
ver = distutils.version.LooseVersion(cversion['stdout'])
if ver < '1.0':
if ver < distutils.version.LooseVersion('1.0'):
raise CommandExecutionError('LXC should be at least 1.0')
__context__[k] = "{0}".format(ver)
return __context__.get(k, None)