[anaconda][rhel7-branch/master][PATCH] Don't attempt terminal size detection on the s390 (#1145065)

Martin Kolman mkolman at redhat.com
Mon Sep 22 12:25:55 UTC 2014


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



More information about the anaconda-patches mailing list