[anaconda][rhel7-branch/master][PATCH] Don't attempt terminal size detection on the s390 (#1145065)
Anne Mulhern
amulhern at redhat.com
Mon Sep 22 13:00:52 UTC 2014
----- Original Message -----
> From: "Martin Kolman" <mkolman at redhat.com>
> To: anaconda-patches at lists.fedorahosted.org
> Sent: Monday, September 22, 2014 8:25:55 AM
> Subject: [anaconda][rhel7-branch/master][PATCH] Don't attempt terminal size detection on the s390 (#1145065)
>
> Resolves: rhbz#1145065
> ---
> pyanaconda/anaconda_argparse.py | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/pyanaconda/anaconda_argparse.py
> b/pyanaconda/anaconda_argparse.py
> index c5dc78d..48c33dc 100644
> --- a/pyanaconda/anaconda_argparse.py
> +++ b/pyanaconda/anaconda_argparse.py
> @@ -84,7 +84,15 @@ class AnacondaArgumentParser(ArgumentParser):
> False: accept the argument with or without the prefix.
> True: ignore the argument without the prefix. (default)
> """
> - help_width = get_help_width()
> + # don't do terminal size detection on s390, it is not supported
> + # by its arcane TTY system and only results in cryptic error
> messages
> + # ending on the standard output
> + # (we do the s390 detection here directly to avoid
> + # the delay caused by importing the Blivet module
> + # just for this single call)
> + is_s390 = os.uname()[4].startswith('s390')
> + if not is_s390:
> + help_width = get_help_width()
> self._boot_arg = dict()
> self.deprecated_bootargs = []
> self.bootarg_prefix = kwargs.pop("bootarg_prefix", "")
> --
> 1.9.3
>
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
>
I think you will get a NameError in s390 case, not when this code is evaluated, but
when formatter_class function is applied, due to help_width
being undefined in that case.
- mulhern
More information about the anaconda-patches
mailing list