diff options
author | Erik Troan <ewt@redhat.com> | 2000-12-06 20:46:11 +0000 |
---|---|---|
committer | Erik Troan <ewt@redhat.com> | 2000-12-06 20:46:11 +0000 |
commit | e483f66f86edd1f85c1196c8e7995254f4df6237 (patch) | |
tree | 858127912517af3c59ca9d55eef3d84cd526c24e /fstab.py | |
parent | f9cb5c2ba9060fd7be72dbf657733d6f69a8bc5e (diff) | |
download | anaconda-e483f66f86edd1f85c1196c8e7995254f4df6237.tar.gz anaconda-e483f66f86edd1f85c1196c8e7995254f4df6237.tar.xz anaconda-e483f66f86edd1f85c1196c8e7995254f4df6237.zip |
be more tolerant of mke2fs errors
Diffstat (limited to 'fstab.py')
-rw-r--r-- | fstab.py | 40 |
1 files changed, 29 insertions, 11 deletions
@@ -1099,24 +1099,42 @@ def ext2FormatFilesystem(argList, messageFile, windowCreator, mntpoint): os.close(p[1]) + # ignoring SIGCHLD would be cleaner then ignoring EINTR, but + # we can't use signal() in this thread? + s = 'a' while s and s != '\b': - s = os.read(p[0], 1) + try: + s = os.read(p[0], 1) + except OSError, args: + (num, str) = args + if (num != 4): + raise IOError, args + os.write(fd, s) num = '' while s: - s = os.read(p[0], 1) - os.write(fd, s) - isys.sync() + try: + s = os.read(p[0], 1) - if s != '\b': - num = num + s - else: - if num: - l = string.split(num, '/') - w.set((int(l[0]) * 100) / int(l[1])) - num = '' + os.write(fd, s) + isys.sync() + + if s != '\b': + try: + num = num + s + except: + pass + else: + if num: + l = string.split(num, '/') + w.set((int(l[0]) * 100) / int(l[1])) + num = '' + except OSError, args: + (num, str) = args + if (num != 4): + raise IOError, args (pid, status) = os.waitpid(childpid, 0) os.close(fd) |