summaryrefslogtreecommitdiff
path: root/azurelinuxagent/common/osutil/factory.py
diff options
context:
space:
mode:
authorƁukasz 'sil2100' Zemczak <lukasz.zemczak@ubuntu.com>2018-02-15 14:28:59 +0100
committerusd-importer <ubuntu-server@lists.ubuntu.com>2018-02-15 19:08:29 +0000
commitd885152bedbdd289f7d6a3d24ab875fd4393bdff (patch)
tree02695107ec9b72658266399201bde17f806601cf /azurelinuxagent/common/osutil/factory.py
parentbdfe3a4fa9bd487ec5f40e829742e127476d2c8a (diff)
downloadvyos-walinuxagent-d885152bedbdd289f7d6a3d24ab875fd4393bdff.tar.gz
vyos-walinuxagent-d885152bedbdd289f7d6a3d24ab875fd4393bdff.zip
Import patches-unapplied version 2.2.21+really2.2.20-0ubuntu1~16.04.1 to ubuntu/xenial-proposed
Imported using git-ubuntu import. Changelog parent: bdfe3a4fa9bd487ec5f40e829742e127476d2c8a New changelog entries: * Backport bionic version to xenial. * Revert to an older upstream release: 2.2.20 (LP: #1749589). - Rename upstream tarball to 2.2.21+really2.2.20 to end up with a temporarily higher version number than what's in the archive. * debian/patches/disable_import_test.patch: refreshed patch.
Diffstat (limited to 'azurelinuxagent/common/osutil/factory.py')
-rw-r--r--azurelinuxagent/common/osutil/factory.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/azurelinuxagent/common/osutil/factory.py b/azurelinuxagent/common/osutil/factory.py
index 1b4e2cb..43aa6a7 100644
--- a/azurelinuxagent/common/osutil/factory.py
+++ b/azurelinuxagent/common/osutil/factory.py
@@ -27,8 +27,7 @@ from .freebsd import FreeBSDOSUtil
from .openbsd import OpenBSDOSUtil
from .redhat import RedhatOSUtil, Redhat6xOSUtil
from .suse import SUSEOSUtil, SUSE11OSUtil
-from .ubuntu import UbuntuOSUtil, Ubuntu12OSUtil, Ubuntu14OSUtil, \
- UbuntuSnappyOSUtil, Ubuntu16OSUtil
+from .ubuntu import UbuntuOSUtil, Ubuntu12OSUtil, Ubuntu14OSUtil, UbuntuSnappyOSUtil
from .alpine import AlpineOSUtil
from .bigip import BigIpOSUtil
from .gaia import GaiaOSUtil
@@ -47,12 +46,10 @@ def get_osutil(distro_name=DISTRO_NAME,
return ClearLinuxUtil()
if distro_name == "ubuntu":
- if Version(distro_version) in [Version("12.04"), Version("12.10")]:
+ if Version(distro_version) == Version("12.04") or Version(distro_version) == Version("12.10"):
return Ubuntu12OSUtil()
- elif Version(distro_version) in [Version("14.04"), Version("14.10")]:
+ elif Version(distro_version) == Version("14.04") or Version(distro_version) == Version("14.10"):
return Ubuntu14OSUtil()
- elif Version(distro_version) in [Version('16.04'), Version('16.10'), Version('17.04')]:
- return Ubuntu16OSUtil()
elif distro_full_name == "Snappy Ubuntu Core":
return UbuntuSnappyOSUtil()
else: