summaryrefslogtreecommitdiffstats
path: root/gui.py
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2003-06-26 21:22:06 +0000
committerMike Fulbright <msf@redhat.com>2003-06-26 21:22:06 +0000
commite3b243ebb778ea2521f27532c6e16b8e4f503e60 (patch)
tree73db24795ba17b49b25f3e12c7294f0d4fa3158d /gui.py
parent727beab943c7552df88093941d740a051ed397e1 (diff)
downloadanaconda-e3b243ebb778ea2521f27532c6e16b8e4f503e60.tar.gz
anaconda-e3b243ebb778ea2521f27532c6e16b8e4f503e60.tar.xz
anaconda-e3b243ebb778ea2521f27532c6e16b8e4f503e60.zip
Changed how we acquire release notes so that we now try to pull it for all install methods. Have tested on all installmethods but CDROM. Only shortcoming presently is 1) It mount/umount the HD image loopback alot of times in process finding the matching file for your lang (we try lots of variations), and 2) lots of IOError warnings on VC3 for HTTP installs for same reason.
Diffstat (limited to 'gui.py')
-rwxr-xr-xgui.py59
1 files changed, 37 insertions, 22 deletions
diff --git a/gui.py b/gui.py
index 740878e9d..ee95b8f62 100755
--- a/gui.py
+++ b/gui.py
@@ -766,31 +766,46 @@ class InstallControlWindow:
self.setScreen ()
def loadReleaseNotes(self):
- langList = self.langSearchPath + [ "" ]
- sourcepath = self.dispatch.method.getSourcePath()
- suffixList = []
- for lang in langList:
- if lang:
- suffixList.append("-%s.html" % (lang,))
- suffixList.append(".%s" % (lang,))
+ langList = self.langSearchPath + [ "" ]
+ suffixList = []
+ for lang in langList:
+ if lang:
+ suffixList.append("-%s.html" % (lang,))
+ suffixList.append(".%s" % (lang,))
else:
- suffixList.append(".html")
- suffixList.append("")
-
- for suffix in suffixList:
- fn = "%s/RELEASE-NOTES%s" % (sourcepath, suffix)
- if os.access(fn, os.R_OK):
- file = open(fn, "r")
- self.releaseNotesContents = file.read()
- if suffix.endswith('.html'):
- self.releaseNotesType="html"
- else:
- self.releaseNotesType="text"
- file.close()
- return
+ suffixList.append(".html")
+ suffixList.append("")
+
+ for suffix in suffixList:
+ fn = "RELEASE-NOTES%s" % (suffix,)
+ try:
+ tmpfile = self.dispatch.method.getFilename(fn, destdir="/tmp", retry=0)
+
+ if tmpfile is None:
+ continue
+
+ file = open(tmpfile, "r")
+ self.releaseNotesContents = file.read()
+ file.close()
+
+ # deal with stupid urllib2 creating a zero length file
+ # when the specified FTP URL doesnt exist
+ if len(self.releaseNotesContents) < 1:
+ self.releaseNotesContents = None
+ continue
+
+ except:
+ continue
+
+ if suffix.endswith('.html'):
+ self.releaseNotesType="html"
+ else:
+ self.releaseNotesType="text"
+
+ return
self.releaseNotesContents=_("Release notes are missing.\n")
- self.releaseNotesType="text"
+ self.releaseNotesType="text"
#
# cant use traditional signals and SIGCHLD to catch viewer exitting,