[PATCH 6/9] Do not use sys.exc_type (#1014220)
Anne Mulhern
amulhern at redhat.com
Wed Jan 28 23:47:46 UTC 2015
Ack.
- mulhern
----- Original Message -----
> From: "Martin Kolman" <mkolman at redhat.com>
> To: anaconda-patches at lists.fedorahosted.org
> Sent: Wednesday, January 28, 2015 12:43:20 PM
> Subject: [PATCH 6/9] Do not use sys.exc_type (#1014220)
>
> The sys.exc_type() function has been removed in Python 3,
> get the exception type from sys.exc_info() instead.
>
> Signed-off-by: Martin Kolman <mkolman at redhat.com>
> ---
> pyanaconda/installclass.py | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/pyanaconda/installclass.py b/pyanaconda/installclass.py
> index 0a92000..7a3f9a7 100644
> --- a/pyanaconda/installclass.py
> +++ b/pyanaconda/installclass.py
> @@ -197,7 +197,7 @@ def availableClasses(showHidden=False):
> try:
> found = imputil.imp.find_module(mainName)
> except ImportError:
> - log.warning ("module import of %s failed: %s", mainName,
> sys.exc_type)
> + log.warning ("module import of %s failed: %s", mainName,
> sys.exc_info()[0])
> continue
>
> try:
> @@ -210,7 +210,7 @@ def availableClasses(showHidden=False):
> if not obj.hidden or showHidden:
> lst.append(((obj.name, obj), sortOrder))
> except (ImportError, AttributeError):
> - log.warning ("module import of %s failed: %s", mainName,
> sys.exc_type)
> + log.warning ("module import of %s failed: %s", mainName,
> sys.exc_info()[0])
>
> lst.sort(_ordering)
> for (item, _) in lst:
> --
> 2.1.0
>
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
>
More information about the anaconda-patches
mailing list