Tim Lauridsen wrote:
Debarshi 'Rishi' Ray wrote:
In any case I will re-write this using some other parsing module.
Let me try.
Done, using cfgparse
(http://pages.cs.wisc.edu/~param/software/cfgparse/) which preserves
the ordering of the options and the comments.
Good thing is that cfgparse provides an additional interface backward
compatible with ConfigParser. So something like this is possible:
try:
from cfgparse.compat import ConfigParser
except ImportError:
from ConfigParser import ConfigParser
without affecting the remaining code, although the absence of cfgparse
will result in loss of comments and ordering of options.
Will send the patch after some more testing.
Happy hacking,
Debarshi
Look fine, the only issue to solve is to keep track of of witch
section (repos) is stored in witch .repo file, so if on repo is
enabled/disabled, all other section was to written to the same file.
in system-config-repo is use some dictionaries to keep track of the
section (repo) to file relation.
Tim
_______________________________________________
Yum-devel mailing list
[email protected]
https://lists.dulug.duke.edu/mailman/listinfo/yum-devel
No voodoo magic, "witch" should have been "which" :-)
Tim
_______________________________________________
Yum-devel mailing list
[email protected]
https://lists.dulug.duke.edu/mailman/listinfo/yum-devel