[PATCH 4/5] Use swapDialogError() for handling DeviceError.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 storage/__init__.py |   30 +++++++++++++++---------------
 1 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/storage/__init__.py b/storage/__init__.py
index 802aef8..01641b1 100644
--- a/storage/__init__.py
+++ b/storage/__init__.py
@@ -1652,21 +1652,21 @@ class FSSet(object):
                     if swapErrorDialog(msg, device):
                         continue
                 except DeviceError as (msg, name):
-                    if anaconda.intf:
-                        if upgrading:
-                            err = _("Error enabling swap device %s: %s\n\n"
-                                    "The /etc/fstab on your upgrade partition "
-                                    "does not reference a valid swap "
-                                    "device.\n\nPress OK to exit the "
-                                    "installer") % (name, msg)
-                        else:
-                            err = _("Error enabling swap device %s: %s\n\n"
-                                    "This most likely means this swap "
-                                    "device has not been initialized.\n\n"
-                                    "Press OK to exit the installer.") % \
-                                  (name, msg)
-                        anaconda.intf.messageWindow(_("Error"), err)
-                    sys.exit(0)
+                    if upgrading:
+                        err = _("Error enabling swap device %s: %s\n\n"
+                                "The /etc/fstab on your upgrade partition "
+                                "does not reference a valid swap "
+                                "device.\n\nPress OK to exit the "
+                                "installer") % (name, msg)
+                    else:
+                        err = _("Error enabling swap device %s: %s\n\n"
+                                "This most likely means this swap "
+                                "device has not been initialized.\n\n"
+                                "Press OK to exit the installer.") % \
+                              (name, msg)
+
+                    if swapErrorDialog(msg, device):
+                        continue
 
                 break
 
-- 
1.6.2.5

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux