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

[PATCH] 471502 - don't bring up the network when the dvd is bad



We were bringing up the network when the DVD was busted, instead of
telling the user to eject or reboot.  Bringing up the network is a bad
idea here because there's not really even anything we can do.  So only
bring up the network in the failure case if we need it and it's down.

- Chris


diff --git a/yuminstall.py b/yuminstall.py
index 694bffe..1ec5463 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -639,16 +639,16 @@ class AnacondaYum(YumSorter):
                 continue
 
     def _handleFailure(self, package):
-        if not network.hasActiveNetDev():
-            if not self.anaconda.intf.enableNetwork(self.anaconda):
-                return
-
         if not self.isodir and self.currentMedia:
             buttons = [_("Re_boot"), _("_Eject")]
         else:
             buttons = [_("Re_boot"), _("_Retry")]
 
-        pkgFile = to_unicode(os.path.basename(package.returnSimple('relativepath')))
+        pkgFile = to_unicode(os.path.basename(package.remote_path))
+
+        if package.repo.needsNetwork() and not network.hasActiveNetDev():
+            if not self.anaconda.intf.enableNetwork(self.anaconda):
+                return
 
         rc = self.anaconda.intf.messageWindow(_("Error"),
                    _("The file %s cannot be opened.  This is due to a missing "


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