mirror of
https://github.com/clearlinux/WALinuxAgent.git
synced 2026-09-06 05:41:57 +00:00
Merge hotfix/2.2.0 back to master (#497)
* Decide version hotfix (#493) * correct the check for installed version * add length check to remove_bom * update version to 2.2.1
This commit is contained in:
@@ -251,8 +251,10 @@ def set_ini_config(config, name, val):
|
||||
|
||||
|
||||
def remove_bom(c):
|
||||
if str_to_ord(c[0]) > 128 and str_to_ord(c[1]) > 128 and \
|
||||
str_to_ord(c[2]) > 128:
|
||||
if len(c) > 2 \
|
||||
and str_to_ord(c[0]) > 128 \
|
||||
and str_to_ord(c[1]) > 128 \
|
||||
and str_to_ord(c[2]) > 128:
|
||||
c = c[3:]
|
||||
return c
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ def get_distro():
|
||||
|
||||
AGENT_NAME = "WALinuxAgent"
|
||||
AGENT_LONG_NAME = "Azure Linux Agent"
|
||||
AGENT_VERSION = '2.2.0'
|
||||
AGENT_VERSION = '2.2.1'
|
||||
AGENT_LONG_VERSION = "{0}-{1}".format(AGENT_NAME, AGENT_VERSION)
|
||||
AGENT_DESCRIPTION = """\
|
||||
The Azure Linux Agent supports the provisioning and running of Linux
|
||||
|
||||
@@ -360,9 +360,10 @@ class ExtHandlerInstance(object):
|
||||
|
||||
# Determine the desired and installed versions
|
||||
requested_version = FlexibleVersion(self.ext_handler.properties.version)
|
||||
installed_version = FlexibleVersion(self.get_installed_version())
|
||||
if installed_version is None:
|
||||
installed_version = requested_version
|
||||
installed_version_string = self.get_installed_version()
|
||||
installed_version = requested_version \
|
||||
if installed_version_string is None \
|
||||
else FlexibleVersion(installed_version_string)
|
||||
|
||||
# Divide packages
|
||||
# - Find the installed package (its version must exactly match)
|
||||
|
||||
Reference in New Issue
Block a user