Douglas Schilling Landgraf has uploaded a new change for review.

Change subject: caps.py: osversion() providing product short info
......................................................................

caps.py: osversion() providing product short info

osversion() reads /etc/default/version into node to provide
release and version info. This patch includes the product short name.

Change-Id: Ifb620f0e0eedd325aad3bab2b5fe1f12f980daa5
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=959152
Signed-off-by: Douglas Schilling Landgraf <dougsl...@redhat.com>
---
M vdsm/caps.py
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/31/15431/1

diff --git a/vdsm/caps.py b/vdsm/caps.py
index 5cf29fc..7d76d5a 100644
--- a/vdsm/caps.py
+++ b/vdsm/caps.py
@@ -239,6 +239,7 @@
             d = _parseKeyVal(file('/etc/default/version'))
             version = d.get('VERSION', '')
             release = d.get('RELEASE', '')
+            osname  = d.get('PRODUCT_SHORT', '')
         elif osname == OSName.DEBIAN:
             version = linecache.getline('/etc/debian_version', 1).strip("\n")
             release = ""  # Debian just has a version entry
@@ -250,7 +251,7 @@
     except:
         logging.error('failed to find version/release', exc_info=True)
 
-    return dict(release=release, version=version, name=osname)
+    return dict(release=release, version=version, name=osname.strip("'"))
 
 
 def get():


--
To view, visit http://gerrit.ovirt.org/15431
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifb620f0e0eedd325aad3bab2b5fe1f12f980daa5
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <dougsl...@redhat.com>
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to