Re: [PATCH rhel6-branch master] Catch errors when downloading the escrow cert (#579992).

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

 



Ack.

On 04/07/2010 04:28 PM, Chris Lumens wrote:
---
  kickstart.py |   14 +++++++++++++-
  1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/kickstart.py b/kickstart.py
index a0fa7d4..7c47933 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -157,11 +157,23 @@ def getEscrowCertificate(anaconda, url):
              sys.exit(1)

      log.info("escrow: downloading %s" % (url,))
-    f = urlgrabber.urlopen(url)
+
+    try:
+        f = urlgrabber.urlopen(url)
+    except urlgrabber.grabber.URLGrabError as e:
+        msg = _("The following error was encountered while downloading the escrow certificate:\n\n%s" % e)
+        if anaconda.intf:
+            anaconda.intf.kickstartErrorWindow(msg)
+            sys.exit(1)
+        else:
+            stderrLog.critical(msg)
+            sys.exit(1)
+
      try:
          anaconda.storage.escrowCertificates[url] = f.read()
      finally:
          f.close()
+
      return anaconda.storage.escrowCertificates[url]

  def deviceMatches(spec):

_______________________________________________
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