[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Pykickstart handling of includes



Hi guys,
I'm working with SNAKE (https://fedorahosted.org/snake/) and created a custom
kickstart template which can also specify %include directives. Then I've overridden the default __str__() method to print the includes at the top.

My trouble is that when SNAKE processes the template the following happens:

1) The template is executed and a string with the ks.cfg contents is returned. At this stage the custom %includes are present

2) Then SNAKE calls parser.readKickstartFromString() where:

handlerclass = pykickstart.parser.returnClassForVersion(version)
handler = handlerclass()
parser = pykickstart.parser.KickstartParser(handler)


3) When finally returning the kickstart string SNAKE does:
return str(handler)


As far as I can see in pykickstart's code the %include directives are not stored anywhere (in case of not following the includes). Then when returning the object as string they are just skipped, only commands like part, user, vnc, etc. are returned.


Is there any particular reason why %includes are not handled like other commands/sections in case of no follow ?

Any objections/guides if I make a patch to store them and be able to print them in the output ?


Thanks,
Alex


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]