From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050513 Fedora/1.0.4-1.3.1 Firefox/1.0.4 Description of problem: The Windows XP monitor.inf file has two irregularities that cause inf2mondb.py to crash. First, I see this message: $ inf2mondb.py monitor.inf Traceback (most recent call last): File "/home/fred/bin/inf2mondb.py", line 163, in ? sync = string.split(modes[3], ',') IndexError: list index out of range $ If I fix inf2mondb.py to get around this problem, I get the following error: $ inf2mondb.py monitor.inf Bridge Information Co.,Ltd; Bridge BM17C; BRG00AB; 30.0-70.0; 50.0-160.0 <snip> (Standard monitor types); Standard VGA 640x480; MS_0640; ; Traceback (most recent call last): File "/home/fred/bin/inf2mondb.py", line 170, in ? for monitor in monitors[man].values(): KeyError: 'applem' $ Version-Release number of selected component (if applicable): hwdata-0.145-1 How reproducible: Always Steps to Reproduce: 1. inf2mondb.py monitor.inf # Monitor .inf file from Windows XP Actual Results: I get the error messages above. Expected Results: Successful running of the script with no error messages. Additional info:
Created attachment 114816 [details] New version of script My patched version of the script.
Created attachment 114817 [details] Possible enhancement to script. This version of the script looks in MonitorsDB and displays entries that don't already exist. It may be possible to write the script to work the old way and my new way depending on parameters, but I'm not a power Python programmer, yet.
Created attachment 114910 [details] Possible script enhancement, version 2 Added parameters --new, --verbose and --database.
Interessting script. I'll take a closer look at it, maybe even put it in as long as it provides by default the same behaviour as the old script. Read ya, Phil
If you keep my enhancements, feel free to change the parameters to more meaningful names. Particularly the "--new" parameter - I couldn't think of a more descriptive word for what I was trying to do.
The parameters sound fine to me, --new could be renamed to --diff, but i don't think thats necessary as long as the help provides some info what --new does. :) I've just tested it, there is still a small bug: If you specify a monitor.inf file and check the output all monitor entries will have the same EISA ID. I tried it with several .inf files and always got that problem. Without having looked at the code closer yet i suspect it's because of some hash lookup where the correlation between a monitor entry in the .inf file and it's EISA number somehow gets lost and only the 1st entry will be picked. Will look at code some more and see if i can find the problem. Otherwise really helpful as i can easily check a new .inf file against the current MonitorsDB and see whats supposedly new. Read ya, Phil
Created attachment 124766 [details] inf2mondb.py the attached version is essentially a complete rewrite of the ini parsing, using ConfigParser. It successfully parses all the monitor*.inf files from Windows XP, as well as all the monitor files posted on ftp.dell.com/monitors/. Using this version, I found 15 monitors that Dell has posted but that aren't in any published MonitorDB files, where using the previous versions, I only found 2. :-)
Using that script internally atm. If it proves to be working for all files i get my hands on i'll probably replace the old in in the near future. Read ya, Phil
Fedora Core 3 is now maintained by the Fedora Legacy project for security updates only. If this problem is a security issue, please reopen and reassign to the Fedora Legacy product. If it is not a security issue and hasn't been resolved in the current FC5 updates or in the FC6 test release, reopen and change the version to match. Thank you!
Updating bug to -devel as it's not addressed in FC6.
I've included your new inf2mondb.py now in the Fedora Devel package as it worked flawless so far and the code looks ok. Will be in next hwdata package in rawhide. Read ya, Phil