[PATCH] Catch AttributeError when looking for InstallClass

Chris Lumens clumens at redhat.com
Wed Aug 14 18:24:06 UTC 2013


> diff --git a/pyanaconda/installclass.py b/pyanaconda/installclass.py
> index b1db1b8..00572b7 100644
> --- a/pyanaconda/installclass.py
> +++ b/pyanaconda/installclass.py
> @@ -193,7 +193,7 @@ def availableClasses(showHidden=0):
>  
>              if obj.hidden == 0 or showHidden == 1:
>                  lst.append(((obj.name, obj), sortOrder))
> -        except ImportError:
> +        except (ImportError, AttributeError):
>              log.warning ("module import of %s failed: %s" % (mainName, sys.exc_type))
>              if flags.debug: raise
>              else: continue

Looks good.  Thanks for catching just the one exception.

- Chris


More information about the anaconda-patches mailing list