diff options
author | Chris Lumens <clumens@redhat.com> | 2005-08-11 21:10:55 +0000 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2005-08-11 21:10:55 +0000 |
commit | be9b1d17b23f3075f12a939cc7d11fe8687edcc9 (patch) | |
tree | 2976ab4680cdf62106006ca7d5e7dd5d2ad9109e /isys/isys.py | |
parent | 3fe2eaa6f45decc83d76c4ec15e8b6c53275cfca (diff) | |
download | anaconda-be9b1d17b23f3075f12a939cc7d11fe8687edcc9.tar.gz anaconda-be9b1d17b23f3075f12a939cc7d11fe8687edcc9.tar.xz anaconda-be9b1d17b23f3075f12a939cc7d11fe8687edcc9.zip |
Converted a lot more messages to the new logging system, but there's still
41 files to go. If your favorite log message needs to be on a different
priority level, feel free to change it. Maybe we can have little commit
wars over them.
Diffstat (limited to 'isys/isys.py')
-rw-r--r-- | isys/isys.py | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/isys/isys.py b/isys/isys.py index 3d3446443..2922a4ea6 100644 --- a/isys/isys.py +++ b/isys/isys.py @@ -24,7 +24,8 @@ import sys import kudzu import iutil -from rhpl.log import log +import logging +log = logging.getLogger("anaconda") mountCount = {} raidCount = {} @@ -83,7 +84,7 @@ def wipeRaidSB(device): try: fd = os.open(device, os.O_WRONLY) except OSError, e: - log("error wiping raid device superblock for %s: %s", device, e) + log.critical("error wiping raid device superblock for %s: %s", device, e) return try: @@ -188,7 +189,7 @@ def mount(device, location, fstype = "ext2", readOnly = 0, bindMount = 0, remoun mountCount[location] = mountCount[location] + 1 return - log("isys.py:mount()- going to mount %s on %s" %(device, location)) + log.info("isys.py:mount()- going to mount %s on %s" %(device, location)) rc = _isys.mount(fstype, device, location, readOnly, bindMount, remount) if not rc: @@ -301,12 +302,12 @@ def hardDriveDict(): makeDevInode(dev, devName) peddev = parted.PedDevice.get(devName) if peddev.model.find("IBM *STMF KERNEL") != -1: - log("%s looks like STMF, ignoring" %(dev,)) + log.warning("%s looks like STMF, ignoring" %(dev,)) del dict[dev] del peddev os.unlink(devName) except Exception, e: - log("exception looking for STMF on %s: %s" %(dev, e)) + log.critical("exception looking for STMF on %s: %s" %(dev, e)) # the only raid devs like this are ide, so only worry about them if not dev.startswith("hd"): @@ -342,10 +343,10 @@ def hardDriveDict(): pass if found == 1: - log("%s has a %s raid signature and windows parts" %(dev, ret)) + log.info("%s has a %s raid signature and windows parts" %(dev, ret)) del dict[dev] else: - log("%s has a %s raid signature but no windows parts" %(dev, ret)) + log.info("%s has a %s raid signature but no windows parts" %(dev, ret)) return driveDict("disk") @@ -390,7 +391,7 @@ def getDasdDevPort(): def getDasdState(dev): devs = getDasdDevPort() if not devs.has_key(dev): - log("don't have %s in /dev/dasd/devices!" %(dev,)) + log.error("don't have %s in /dev/dasd/devices!" %(dev,)) return 0 f = open("/proc/dasd/devices", "r") @@ -585,7 +586,7 @@ def readXFSLabel_int(device): buf = os.read(fd, 128) os.close(fd) except OSError, e: - log("error reading xfs label on %s: %s" %(device, e)) + log.error("error reading xfs label on %s: %s" %(device, e)) try: os.close(fd) except: @@ -619,7 +620,7 @@ def readJFSLabel_int(device): buf = os.read(fd, 180) os.close(fd) except OSError, e: - log("error reading jfs label on %s: %s" %(device, e)) + log.error("error reading jfs label on %s: %s" %(device, e)) try: os.close(fd) except: @@ -652,7 +653,7 @@ def readSwapLabel_int(device): buf = os.read(fd, pagesize) os.close(fd) except OSError, e: - log("error reading swap label on %s: %s" %(device, e)) + log.error("error reading swap label on %s: %s" %(device, e)) try: os.close(fd) except: @@ -720,7 +721,7 @@ def ejectCdrom(device, makeDevice = 1): try: _isys.ejectcdrom(fd) except SystemError, e: - log("error ejecting cdrom (%s): %s" %(device, e)) + log.error("error ejecting cdrom (%s): %s" %(device, e)) pass os.close(fd) |