On 08/12/2011 04:25 PM, Chris Lumens wrote:
Wouldn't it make more sense if copy_to_sysimage just took a rootPath parameter, defaulted to "/mnt/sysimage", always? Then callers could decide whether to pass anything or to pass anaconda.rootPath. I'm not so much a fan of having required arguments without values that will result in errors, even though I'm sure I have done it many times.
I sent a new patch where the function only takes root_path as you suggest. As for the default value: currently there is the 'anaconda.rootPath'. The existence of this variable would seem to suggest that it can point anywhere though in practice we know it is always '/mnt/sysimage' now. So the correct thing to do would be removing anaconda.rootPath and have a constant somewhere instead and then the default value of the new parameter would be this constant (or better: the method would take no parameters). But using '/mnt/sysimage' as the default denies the existence of anaconda.rootPath and treats it as a constant already.
(I also have this radical opinion that the anaconda object should be a singleton so we can stop passing it around all the time.)
Hope you like the new patch. Ales _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list