]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Fix function parsing the kernel version
authorSimon Pasquier <simon.pasquier@bull.net>
Tue, 1 Apr 2014 13:55:55 +0000 (15:55 +0200)
committerMark McClain <mmcclain@yahoo-inc.com>
Fri, 4 Apr 2014 23:02:24 +0000 (19:02 -0400)
Change-Id: Id56efb476144a18cd9eb7279bc0f602760a86173
Closes-Bug: #1300808
(cherry picked from commit d4fdac7ae596888b8e83d9559019eafb728cd3fe)

neutron/agent/linux/ovs_lib.py

index 7cdb6f4dc702e0d26b127fd2e3ea800aaa2cfb3a..e1172234f8f2677280442914f949684812e84ff7 100644 (file)
@@ -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."))