[PATCH f14-branch master] Attempt to bring the network up before saving a bug report (#635821).

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

 



Now that we're using report, we don't have quite the level of integration
necessary to only ask to bring up the network before saving to bugzilla
or scp.  Therefore, we just need to ask for the network before saving at all
and trust that report will fail correctly should the user not bring up an
interface but still try bugzilla.
---
 pyanaconda/gui.py  |   15 +++++++++++++++
 pyanaconda/text.py |   17 ++++++++++++++++-
 2 files changed, 31 insertions(+), 1 deletions(-)

diff --git a/pyanaconda/gui.py b/pyanaconda/gui.py
index 1853b2d..fc37f12 100755
--- a/pyanaconda/gui.py
+++ b/pyanaconda/gui.py
@@ -1074,6 +1074,21 @@ class InstallInterface(InstallInterfaceBase):
 
     def saveExceptionWindow(self, accountManager, signature):
         from meh.ui.gui import SaveExceptionWindow
+        import urlgrabber
+
+        if not network.hasActiveNetDev():
+            if self.messageWindow(_("Warning"),
+                   _("You do not have an active network connection.  This is "
+                     "required by some exception saving methods.  Would you "
+                     "like to configure your network now?"),
+                   type = "yesno"):
+
+                if not self.enableNetwork():
+                    self.messageWindow(_("No Network Available"),
+                                       _("Remote exception saving methods will not work."))
+                else:
+                    urlgrabber.grabber.reset_curl_obj()
+
         win = SaveExceptionWindow (accountManager, signature)
         win.run()
 
diff --git a/pyanaconda/text.py b/pyanaconda/text.py
index 3e52978..c77340f 100644
--- a/pyanaconda/text.py
+++ b/pyanaconda/text.py
@@ -383,7 +383,7 @@ class InstallInterface(InstallInterfaceBase):
     def enableNetwork(self):
         if len(self.anaconda.network.netdevices) == 0:
             return False
-        from netconfig_text import NetworkConfiguratorText
+        from textw.netconfig_text import NetworkConfiguratorText
         w = NetworkConfiguratorText(self.screen, self.anaconda)
         ret = w.run()
         return ret != INSTALL_BACK
@@ -405,6 +405,21 @@ class InstallInterface(InstallInterfaceBase):
 
     def saveExceptionWindow(self, accountManager, signature, *args, **kwargs):
         from meh.ui.text import SaveExceptionWindow
+        import urlgrabber
+
+        if not hasActiveNetDev():
+            if self.messageWindow(_("Warning"), 
+                   _("You do not have an active network connection.  This is "
+                     "required by some exception saving methods.  Would you "
+                     "like to configure your network now?"),
+                   type = "yesno"):
+
+                if not self.enableNetwork():
+                    self.messageWindow(_("No Network Available"),
+                                       _("Remote exception saving methods will not work."))
+                else:
+                    urlgrabber.grabber.reset_curl_obj()
+
         win = SaveExceptionWindow (accountManager, signature, screen=self.screen,
                                    *args, **kwargs)
         win.run()
-- 
1.7.1.1

_______________________________________________
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