From: Simon Pasquier Date: Tue, 1 Apr 2014 13:55:55 +0000 (+0200) Subject: Fix function parsing the kernel version X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=ea6b2b9cfaee9053639649935e9659e0bcff286c;p=openstack-build%2Fneutron-build.git Fix function parsing the kernel version Change-Id: Id56efb476144a18cd9eb7279bc0f602760a86173 Closes-Bug: #1300808 (cherry picked from commit d4fdac7ae596888b8e83d9559019eafb728cd3fe) --- diff --git a/neutron/agent/linux/ovs_lib.py b/neutron/agent/linux/ovs_lib.py index 7cdb6f4dc..e1172234f 100644 --- a/neutron/agent/linux/ovs_lib.py +++ b/neutron/agent/linux/ovs_lib.py @@ -484,7 +484,8 @@ def get_installed_kernel_version(): try: cmd = utils.execute(args) for line in cmd.split('\n'): - return str(re.findall("\d+\.\d+\.\d+", line)) + ver = re.findall("\d+\.\d+\.\d+", line) + return ver[0] except Exception: LOG.exception(_("Unable to retrieve installed Linux kernel version."))