From 43bdf9debe5377216aed0086bff2aad864f6ba82 Mon Sep 17 00:00:00 2001 From: Ɓukasz 'sil2100' Zemczak Date: Mon, 3 Jul 2017 13:44:00 +0200 Subject: Import patches-unapplied version 2.2.14-0ubuntu1 to ubuntu/artful-proposed Imported using git-ubuntu import. Changelog parent: 4fb0b5a09b26135ade285844da5d7dfe582a8d4c New changelog entries: * New upstream release (LP: #1701350). * debian/copyright: - Refreshed copyright content. --- azurelinuxagent/common/version.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'azurelinuxagent/common/version.py') diff --git a/azurelinuxagent/common/version.py b/azurelinuxagent/common/version.py index dc3592b..d1d4c62 100644 --- a/azurelinuxagent/common/version.py +++ b/azurelinuxagent/common/version.py @@ -77,6 +77,9 @@ def get_distro(): if 'FreeBSD' in platform.system(): release = re.sub('\-.*\Z', '', ustr(platform.release())) osinfo = ['freebsd', release, '', 'freebsd'] + elif 'OpenBSD' in platform.system(): + release = re.sub('\-.*\Z', '', ustr(platform.release())) + osinfo = ['openbsd', release, '', 'openbsd'] elif 'linux_distribution' in dir(platform): supported = platform._supported_dists + ('alpine',) osinfo = list(platform.linux_distribution(full_distribution_name=0, @@ -110,7 +113,7 @@ def get_distro(): AGENT_NAME = "WALinuxAgent" AGENT_LONG_NAME = "Azure Linux Agent" -AGENT_VERSION = '2.2.12' +AGENT_VERSION = '2.2.14' AGENT_LONG_VERSION = "{0}-{1}".format(AGENT_NAME, AGENT_VERSION) AGENT_DESCRIPTION = """ The Azure Linux Agent supports the provisioning and running of Linux @@ -160,7 +163,10 @@ CURRENT_AGENT, CURRENT_VERSION = set_current_agent() def set_goal_state_agent(): agent = None - pids = [pid for pid in os.listdir('/proc') if pid.isdigit()] + if os.path.isdir("/proc"): + pids = [pid for pid in os.listdir('/proc') if pid.isdigit()] + else: + pids = [] for pid in pids: try: pname = open(os.path.join('/proc', pid, 'cmdline'), 'rb').read() -- cgit v1.2.3