summaryrefslogtreecommitdiffstats
path: root/urlinstall.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2005-08-12 17:02:54 +0000
committerChris Lumens <clumens@redhat.com>2005-08-12 17:02:54 +0000
commitad06ecd663388d31e24ed8a915cbb75c8c09e5e3 (patch)
tree7ec622b907c6b5ba672512bba993a0e109cfdb18 /urlinstall.py
parentbe9b1d17b23f3075f12a939cc7d11fe8687edcc9 (diff)
downloadanaconda-ad06ecd663388d31e24ed8a915cbb75c8c09e5e3.tar.gz
anaconda-ad06ecd663388d31e24ed8a915cbb75c8c09e5e3.tar.xz
anaconda-ad06ecd663388d31e24ed8a915cbb75c8c09e5e3.zip
Use new logging system.
Diffstat (limited to 'urlinstall.py')
-rw-r--r--urlinstall.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/urlinstall.py b/urlinstall.py
index 07dd02e7b..e27ad44d7 100644
--- a/urlinstall.py
+++ b/urlinstall.py
@@ -34,7 +34,8 @@ import ftplib
import httplib
import StringIO
-from rhpl.log import log
+import logging
+log = logging.getLogger("anaconda")
FILENAME = 1000000
DISCNUM = 1000002
@@ -84,7 +85,7 @@ class UrlInstallMethod(InstallMethod):
# if not local then assume its on host
if fname is None:
fname = '%s/%s/base/comps.xml' % (self.baseUrl, productPath)
- log("Comps not in update dirs, using %s",fname)
+ log.warning("Comps not in update dirs, using %s",fname)
return groupSetFromCompsFile(fname, hdlist)
def getFilename(self, filename, callback=None, destdir=None, retry=1,
@@ -109,8 +110,8 @@ class UrlInstallMethod(InstallMethod):
try:
rc=urlretrieve(fullPath, file, callback=callback)
except IOError, (errnum, msg):
- log("IOError %s occurred getting %s: %s"
- %(errnum, fullPath.replace("%", "%%"), str(msg)))
+ log.critical("IOError %s occurred getting %s: %s"
+ %(errnum, fullPath.replace("%", "%%"), str(msg)))
if not retry:
raise FileCopyException
@@ -149,8 +150,8 @@ class UrlInstallMethod(InstallMethod):
try:
urlretrieve(fullPath, file)
except IOError, (errnum, msg):
- log("IOError %s occurred getting %s: %s",
- errnum, fullPath.replace("%", "%%"), str(msg))
+ log.critical("IOError %s occurred getting %s: %s",
+ errnum, fullPath.replace("%", "%%"), str(msg))
time.sleep(5)
else:
break
@@ -169,7 +170,8 @@ class UrlInstallMethod(InstallMethod):
try:
url = grabber.urlopen (hdurl, retry = 5)
except grabber.URLGrabError, e:
- log ("URLGrabError: %s occurred getting %s", e.strerror, hdurl)
+ log.critical ("URLGrabError: %s occurred getting %s", e.strerror,
+ hdurl)
raise FileCopyException
raw = url.read(16)