FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 09-05-2011, 01:58 PM
Martin Sivak
 
Default Suppress critical errors when guessing release notes names (#707143).

Looks good.

--
Martin Sivák
msivak@redhat.com
Red Hat Czech
Anaconda team / Brno, CZ

----- Original Message -----
> ---
> iw/release_notes.py | 9 ++++++++-
> urlinstall.py | 12 +++++++-----
> 2 files changed, 15 insertions(+), 6 deletions(-)
>
> diff --git a/iw/release_notes.py b/iw/release_notes.py
> index ca7d87c..38b5bbc 100644
> --- a/iw/release_notes.py
> +++ b/iw/release_notes.py
> @@ -26,6 +26,9 @@ import gui
>
> from rhpl.translate import _, N_
>
> +import logging
> +log = logging.getLogger("anaconda")
> +
> class ReleaseNotesViewer:
> def __init__(self, anaconda):
> self.currentURI = None
> @@ -62,7 +65,10 @@ class ReleaseNotesViewer:
> for suffix in suffixList:
> fn = "RELEASE-NOTES%s" % (suffix,)
> try:
> - tmpfile =
> os.path.abspath(self.anaconda.dispatch.method.getF ilename(fn,
> destdir="/tmp", retry=0))
> + tmpfile = os.path.abspath(
> + self.anaconda.dispatch.method.getFilename(
> + fn, destdir="/tmp", retry=0,
> + loglevel=logging.INFO))
> if tmpfile is None:
> continue
>
> @@ -79,6 +85,7 @@ class ReleaseNotesViewer:
> except:
> continue
>
> + log.error("getReleaseNotes() failed.")
> return None
>
> def resize(self, w=None, h=None):
> diff --git a/urlinstall.py b/urlinstall.py
> index d0b1e00..4c0f6da 100644
> --- a/urlinstall.py
> +++ b/urlinstall.py
> @@ -117,7 +117,8 @@ class UrlInstallMethod(InstallMethod):
> isys.makeDevInode("loop0", "/tmp/loop")
> isys.lochangefd("/tmp/loop", self.loopbackFile)
>
> - def getFilename(self, filename, callback=None, destdir=None,
> retry=1):
> + def getFilename(self, filename, callback=None, destdir=None,
> retry=1,
> + loglevel=logging.CRITICAL):
>
> if destdir is None:
> tmppath = self.getTempPath()
> @@ -125,7 +126,7 @@ class UrlInstallMethod(InstallMethod):
> tmppath = destdir
>
> base = self.pkgUrl
> -
> +
> fullPath = base + "/" + filename
>
> file = tmppath + "/" + os.path.basename(fullPath)
> @@ -135,12 +136,13 @@ class UrlInstallMethod(InstallMethod):
> try:
> rc=urlretrieve(fullPath, file, callback=callback)
> except IOError, (errnum, msg):
> - log.critical("IOError %s occurred getting %s: %s"
> - %(errnum, fullPath.replace("%", "%%"), str(msg)))
> + if loglevel:
> + log.log(loglevel, "Problem (%s) occurred getting %s: %s"
> + %(errnum, fullPath.replace("%", "%%"), str(msg)))
>
> if not retry:
> raise FileCopyException
> -
> +
> time.sleep(5)
> else:
> break
> --
> 1.7.6
>
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list@redhat.com
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list

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

Thread Tools




All times are GMT. The time now is 06:18 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org