Merge pull request #47554 from douglasjreynolds/lxc_unicode_fix

Converted unicode str version to a LooseVersion; matching line 2080.
This commit is contained in:
Nicole Thomas 2018-05-09 09:34:13 -04:00 committed by GitHub
commit f9083ff77e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -867,7 +867,7 @@ def _network_conf(conf_tuples=None, **kwargs):
# on old versions of lxc, still support the gateway auto mode
# if we didn't explicitly say no to
# (lxc.network.ipv4.gateway: auto)
if _LooseVersion(version()) <= '1.0.7' and \
if _LooseVersion(version()) <= _LooseVersion('1.0.7') and \
True not in ['lxc.network.ipv4.gateway' in a for a in ret] and \
True in ['lxc.network.ipv4' in a for a in ret]:
ret.append({'lxc.network.ipv4.gateway': 'auto'})