[PATCH] Add --root-device to upgrade command

Alexander Todorov atodorov at redhat.com
Fri Dec 12 16:15:54 UTC 2008


Chris Lumens wrote:
>> +    def _getParser(self):
>> +        op = KSOptionParser(lineno=self.lineno)
>> +        op.add_option("--root-device", dest="root_device")
>> +        return op
> 
> Instead of calling KSOptionParser, call FC3_Upgrade._getParser(self)
> here to pull in whatever arguments FC3_Upgrade's KSOptionParser object
> may support.  I know it's none in this case, but that's how it works in
> every other class in pykickstart and I really like things to be
> consistent.
> 

See F9_Autopart vs. FC3_Autopart. Same case as with upgrades. The base class 
doesn't define _getParser and the derived class calls KSOptionParser directly 
instead of calling _getParser from the base class. This will break when the base 
class doesn't define _getParser.

Attached patch with all other issues resolved except the _getParser change.

--
Alexander.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pykickstart_upgrade.patch
Type: text/x-patch
Size: 2702 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/kickstart-list/attachments/20081212/492e1a37/attachment.bin>


More information about the Kickstart-list mailing list