[PATCH] Let finding install classes be more flexible for Fedora (#1138820).
Vratislav Podzimek
vpodzime at redhat.com
Mon Sep 8 06:41:28 UTC 2014
On Fri, 2014-09-05 at 14:21 -0400, Chris Lumens wrote:
> (1) Make it so a valid install class does not have to be named "InstallClass"
> which should make inheritance less cumbersome.
>
> (2) Allow putting more than one install class into a single file.
>
> (3) Rename the existing install classes to be <distro>BaseInstallClass. This
> makes it more clear for subclasses where they're coming from.
> ---
> pyanaconda/installclass.py | 16 ++++++----------
> pyanaconda/installclasses/fedora.py | 2 +-
> pyanaconda/installclasses/rhel.py | 2 +-
> 3 files changed, 8 insertions(+), 12 deletions(-)
>
> diff --git a/pyanaconda/installclass.py b/pyanaconda/installclass.py
> index 4fd8865..3a52f65 100644
> --- a/pyanaconda/installclass.py
> +++ b/pyanaconda/installclass.py
> @@ -185,7 +185,6 @@ def availableClasses(showHidden=0):
> continue
> done[mainName] = 1
>
> -
> try:
> found = imputil.imp.find_module(mainName)
> except ImportError:
> @@ -195,15 +194,12 @@ def availableClasses(showHidden=0):
> try:
> loaded = imputil.imp.load_module(mainName, found[0], found[1], found[2])
>
> - obj = loaded.InstallClass
> -
> - if 'sortPriority' in obj.__dict__:
> - sortOrder = obj.sortPriority
> - else:
> - sortOrder = 0
> -
> - if obj.hidden == 0 or showHidden == 1:
We should, at some point, change these to real booleans.
--
Vratislav Podzimek
Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
More information about the anaconda-patches
mailing list