Reset method seen attrs when switching method (#1004889)
commit21236571e995832877aaa19cfc8d29b0154462d5
authorBrian C. Lane <bcl@redhat.com>
Mon, 9 Sep 2013 22:10:14 +0000 (9 15:10 -0700)
committerBrian C. Lane <bcl@redhat.com>
Mon, 9 Sep 2013 22:10:14 +0000 (9 15:10 -0700)
treea8ba7843f1160ddcb3a7f898e37e8b5395cc0e51
parent39c07cac971f9a2901477cf697a5bf228638254e
Reset method seen attrs when switching method (#1004889)

The method initially gets set to cdrom, it can then be switched to
another method via UI or when falling back to closest mirror if a repo
isn't found. This would result in .seen to be set on multiple methods,
and since .cdrom.seen was checked first it would be used for the
attributes -- some of which don't exist.

This clears the .seen attr when switching methods or setting it to None.

It also fixes a problem where None was being returned for too many attrs
which caused problems with the internal operations of copy.copy used by
the software spoke to detect changes from the previous method settings.
Only return None if the name is "method" otherwise pass it through to
the superclass' __getattr__
pykickstart/commands/method.py