Fix the test failures in the new rescue mode.
From: David Shea dshea@redhat.com
--- pyanaconda/constants_text.py | 1 - 1 file changed, 1 deletion(-)
diff --git a/pyanaconda/constants_text.py b/pyanaconda/constants_text.py index 29f7799..b37dc81 100644 --- a/pyanaconda/constants_text.py +++ b/pyanaconda/constants_text.py @@ -19,7 +19,6 @@
# pylint: disable=wildcard-import from pyanaconda.constants import * -from pyanaconda.i18n import _, N_
# Make the return calls from the UIScreen input() function more clear INPUT_PROCESSED = None
From: David Shea dshea@redhat.com
Redefine open to iutil's better open, fix the passing of format parameters to a translated string, use iutil.setenv to add environment variables for future child processes instead of modifying the current process's environment, and ignore the warning about catching Exception. --- pyanaconda/rescue.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/pyanaconda/rescue.py b/pyanaconda/rescue.py index 108be51..9411ed5 100644 --- a/pyanaconda/rescue.py +++ b/pyanaconda/rescue.py @@ -34,6 +34,8 @@
from pykickstart.constants import KS_REBOOT, KS_SHUTDOWN
+from pyanaconda.iutil import open # pylint: disable=redefined-builtin + import os import shutil import time @@ -341,8 +343,8 @@ def refresh(self, args=None): else: text = TextWidget(_("Your system has been mounted under %s.\n\nIf " "you would like to make your system the root " - "environment, run the command:\n\n\tchroot %s\n" - % (iutil.getSysroot(), iutil.getSysroot()))) + "environment, run the command:\n\n\tchroot %s\n") + % (iutil.getSysroot(), iutil.getSysroot())) self._window.append(text) rootmounted = True
@@ -366,7 +368,7 @@ def refresh(self, args=None): # set a libpath to use mounted fs libdirs = os.environ.get("LD_LIBRARY_PATH", "").split(":") mounted = list(map(lambda dir: "/mnt/sysimage%s" % dir, libdirs)) - os.environ["LD_LIBRARY_PATH"] = ":".join(libdirs + mounted) + iutil.setenv("LD_LIBRARY_PATH", ":".join(libdirs + mounted))
# do we have bash? try: @@ -376,7 +378,7 @@ def refresh(self, args=None): pass except (ValueError, LookupError, SyntaxError, NameError): pass - except Exception as e: + except Exception as e: # pylint: disable=broad-except if flags.automatedInstall: msg = _("Run %s to unmount the system when you are finished.\n") % ANACONDA_CLEANUP
From: David Shea dshea@redhat.com
--- pyanaconda/rescue.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/pyanaconda/rescue.py b/pyanaconda/rescue.py index 9411ed5..c4b3669 100644 --- a/pyanaconda/rescue.py +++ b/pyanaconda/rescue.py @@ -341,10 +341,10 @@ def refresh(self, args=None): if flags.automatedInstall: log.info("System has been mounted under: %s", iutil.getSysroot()) else: - text = TextWidget(_("Your system has been mounted under %s.\n\nIf " + text = TextWidget(_("Your system has been mounted under %(mountpoint)s.\n\nIf " "you would like to make your system the root " - "environment, run the command:\n\n\tchroot %s\n") - % (iutil.getSysroot(), iutil.getSysroot())) + "environment, run the command:\n\n\tchroot %(mountpoint)s\n") + % {"mountpoint": iutil.getSysroot()} ) self._window.append(text) rootmounted = True
From: David Shea dshea@redhat.com
--- pyanaconda/rescue.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/rescue.py b/pyanaconda/rescue.py index c4b3669..0ef0a6e 100644 --- a/pyanaconda/rescue.py +++ b/pyanaconda/rescue.py @@ -153,7 +153,7 @@ def refresh(self, args=None): "to find your Linux installation and mount it under " "the directory : %s. You can then make any changes " "required to your system. Choose '1' to proceed with " - "this step.\nYou can choose to mount your file" + "this step.\nYou can choose to mount your file " "systems read-only instead of read-write by choosing " "'2'.\nIf for some reason this process does not work " "choose '3' to skip directly to a shell.\n\n") % (iutil.getSysroot())), ""]
These all look good to me.
Added label: ACK.
Pushed.
Closed.
anaconda-patches@lists.fedorahosted.org