About this computer

Stemp Ubuntu stempubuntu at gmail.com
Fri Dec 14 11:58:02 GMT 2007


Same problem here but cause by Screen 0 line.
So I've changed 

if xorgconf_indev == True :
	finalnode = xorgline.split('"')[1]
	if xorgline.find('Identifier') != -1 :
		xorgconf_id = finalnode
	if xorgline.find('Driver') != -1 :
		xorgconf_dev = finalnode

to 
if xorgconf_indev == True :
	if xorgline.find('Identifier') != -1 :
		xorgconf_id = xorgline.split('"')[1]
	if xorgline.find('Driver') != -1 :
		xorgconf_dev = xorgline.split('"')[1]

Then another problem with gnome version probably cause by French
Language so :

[dontcare, gnomeinfo, dontcareeither] = os.popen3('gnome-about
--gnome-version')

to 

[dontcare, gnomeinfo, dontcareeither] = os.popen3('LANG=C gnome-about
--gnome-version')

Le vendredi 14 décembre 2007 à 12:01 +0100, Denis Washington a écrit :
> On Fri, 2007-12-14 at 05:00 +0000, Ted Gould wrote:
> > It needs to be cleaned up, but I'm currently more worried about
> > correctness.  I don't need posts from everyone unless the values come
> > out with something that is incorrect.  If everything is right don't
> > worry about it.
> 
> If I run the script on my machine, I get this:
> 
> Processor:  AMD Athlon(tm) XP 2200+
> HD size:  61492838400 bytes
> Network:  VIA Technologies, Inc. :  VT6102 [Rhine-II]
> Traceback (most recent call last):
>   File "test.py", line 115, in <module>
>     main()
>   File "test.py", line 56, in main
>     finalnode = xorgline.split('"')[1]
> IndexError: list index out of range
> 
> This is because you don't seem to be skipping empty lines for xorg.conf,
> which I have in my "Device" section. I fixed it like this in your
> script:
> 
> if len(xorgline) == 0:
> 	continue
> 
> Also, note that Python strings are immutable: the call to strip()
> returns the stripped version of the string, but doesn't touch the
> original object. So:
> 
> xorgline.strip()
> 
> has to be:
> 
> xorgline = xorgline.strip()
> 
> I attached the script with the told changes to this mail. Besides that,
> all information was gathered correctly for me.
> 
> Cheers,
> Denis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.py
Type: text/x-python
Size: 3658 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/ubuntu-desktop/attachments/20071214/e47259d5/attachment.py 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Ceci est une partie de message
	=?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=
Url : https://lists.ubuntu.com/archives/ubuntu-desktop/attachments/20071214/e47259d5/attachment.pgp 


More information about the ubuntu-desktop mailing list