diff options
author | Chris Lumens <clumens@redhat.com> | 2009-04-23 13:01:35 -0400 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2009-04-23 14:17:14 -0400 |
commit | cfac7bcb2079b463e33c2401002575d0de12d9b2 (patch) | |
tree | 488fb8e49604b3245dca24961fda684888bd56d8 /livecd.py | |
parent | 11bbfaa2b00d1a212462c689834a9179b15cb843 (diff) | |
download | anaconda-cfac7bcb2079b463e33c2401002575d0de12d9b2.tar.gz anaconda-cfac7bcb2079b463e33c2401002575d0de12d9b2.tar.xz anaconda-cfac7bcb2079b463e33c2401002575d0de12d9b2.zip |
When catching an OSError, handle it as an object instead of a tuple (#497374).
Diffstat (limited to 'livecd.py')
-rw-r--r-- | livecd.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -90,8 +90,8 @@ def copytree(src, dst, symlinks=False, preserveOwner=False, if preserveSelinux: selinux.lsetfilecon(dst, selinux.lgetfilecon(src)[1]) shutil.copystat(src, dst) - except OSError, why: - errors.extend((src, dst, str(why))) + except OSError as e: + errors.extend((src, dst, e.strerror)) if errors: raise Error, errors @@ -299,7 +299,7 @@ class LiveCDCopyBackend(backend.AnacondaBackend): try: os.rmdir("%s/mnt/%s" %(anaconda.rootPath, e.format.mountpoint)) - except OSError, e: + except OSError as e: log.debug("error removing %s" %(tocopy,)) for e in [entry] + fsdict[tocopy]: e.format.setup(chroot=anaconda.rootPath) |