From 185ceb32fea5d5c2a43d7b6ee2a40228489055f4 Mon Sep 17 00:00:00 2001 From: Ɓukasz 'sil2100' Zemczak Date: Mon, 4 Sep 2017 10:27:07 +0200 Subject: Import patches-unapplied version 2.2.16-0ubuntu1 to ubuntu/artful-proposed Imported using git-ubuntu import. Changelog parent: 43bdf9debe5377216aed0086bff2aad864f6ba82 New changelog entries: * New upstream release (LP: #1714299). --- azurelinuxagent/common/version.py | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'azurelinuxagent/common/version.py') diff --git a/azurelinuxagent/common/version.py b/azurelinuxagent/common/version.py index d1d4c62..f27db38 100644 --- a/azurelinuxagent/common/version.py +++ b/azurelinuxagent/common/version.py @@ -113,7 +113,7 @@ def get_distro(): AGENT_NAME = "WALinuxAgent" AGENT_LONG_NAME = "Azure Linux Agent" -AGENT_VERSION = '2.2.14' +AGENT_VERSION = '2.2.16' AGENT_LONG_VERSION = "{0}-{1}".format(AGENT_NAME, AGENT_VERSION) AGENT_DESCRIPTION = """ The Azure Linux Agent supports the provisioning and running of Linux @@ -129,9 +129,20 @@ AGENT_NAME_PATTERN = re.compile(AGENT_PATTERN) AGENT_PKG_PATTERN = re.compile(AGENT_PATTERN+"\.zip") AGENT_DIR_PATTERN = re.compile(".*/{0}".format(AGENT_PATTERN)) -EXT_HANDLER_PATTERN = b".*/WALinuxAgent-(\w.\w.\w[.\w]*)-.*-run-exthandlers" +EXT_HANDLER_PATTERN = b".*/WALinuxAgent-(\d+.\d+.\d+[.\d+]*).*-run-exthandlers" EXT_HANDLER_REGEX = re.compile(EXT_HANDLER_PATTERN) +__distro__ = get_distro() +DISTRO_NAME = __distro__[0] +DISTRO_VERSION = __distro__[1] +DISTRO_CODE_NAME = __distro__[2] +DISTRO_FULL_NAME = __distro__[3] + +PY_VERSION = sys.version_info +PY_VERSION_MAJOR = sys.version_info[0] +PY_VERSION_MINOR = sys.version_info[1] +PY_VERSION_MICRO = sys.version_info[2] + # Set the CURRENT_AGENT and CURRENT_VERSION to match the agent directory name # - This ensures the agent will "see itself" using the same name and version @@ -173,6 +184,8 @@ def set_goal_state_agent(): match = EXT_HANDLER_REGEX.match(pname) if match: agent = match.group(1) + if PY_VERSION_MAJOR > 2: + agent = agent.decode('UTF-8') break except IOError: continue @@ -188,18 +201,6 @@ def is_current_agent_installed(): return CURRENT_AGENT == AGENT_LONG_VERSION -__distro__ = get_distro() -DISTRO_NAME = __distro__[0] -DISTRO_VERSION = __distro__[1] -DISTRO_CODE_NAME = __distro__[2] -DISTRO_FULL_NAME = __distro__[3] - -PY_VERSION = sys.version_info -PY_VERSION_MAJOR = sys.version_info[0] -PY_VERSION_MINOR = sys.version_info[1] -PY_VERSION_MICRO = sys.version_info[2] - - def is_snappy(): """ Add this workaround for detecting Snappy Ubuntu Core temporarily, -- cgit v1.2.3