On Mon, 2014-09-22 at 09:00 -0400, Anne Mulhern wrote:
----- Original Message -----
From: "Martin Kolman" mkolman@redhat.com To: anaconda-patches@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@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.
Oops, good point! :) Now looking at the code, I think I'll move the s390 detection code to the get_help_width() function when I'm at it.
- mulhern
anaconda-patches mailing list anaconda-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches