From 5bf89fb2891329d85c830cfc51d28e6e63fe9543 Mon Sep 17 00:00:00 2001 From: Mike Hiretsky Date: Wed, 10 Nov 2010 13:06:23 +0300 Subject: [PATCH] Add variable hr_laptop_model --- pym/cl_fill.py | 8 ++++++++ pym/cl_vars.py | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/pym/cl_fill.py b/pym/cl_fill.py index db8f940..ac1c1c6 100644 --- a/pym/cl_fill.py +++ b/pym/cl_fill.py @@ -565,6 +565,14 @@ class fillVars(varsShare): "unknown" return "" + def get_hr_laptop_model(self): + """Laptop name""" + boardName = '/sys/class/dmi/id/board_name' + if self.Get('hr_laptop') and os.access(boardName,os.R_OK): + valBoardName = open(boardName,'r').read().strip() + return valBoardName or "unknown" + return "" + def get_hr_video(self): """Videocard vendor""" lines=self._runos("lspci") diff --git a/pym/cl_vars.py b/pym/cl_vars.py index 688f548..8323a6e 100644 --- a/pym/cl_vars.py +++ b/pym/cl_vars.py @@ -170,9 +170,12 @@ class Data: # the nearest standard size of image to current screen resolution os_x11_standart = {'hide':True} - # if computer is noteboot, the this variable containt its vendor + # if computer is notebook, the this variable containt its vendor hr_laptop = {'hide':True} + # if computer is notebook, model name + hr_laptop_model = {'hide':True} + # video verdor name hr_video = {'hide':True}