diff options
author | Jeremy Katz <katzj@redhat.com> | 2002-07-11 04:02:51 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2002-07-11 04:02:51 +0000 |
commit | cb02fd143ffd4c891c251884da2c6f6d44b9f549 (patch) | |
tree | 099ef8d2a3d413bf91d5c538d2ae630c6f8c8409 /fsset.py | |
parent | e038e90dbeb9cc2b5f75cb232b90e51c4a4fac9d (diff) | |
download | anaconda-cb02fd143ffd4c891c251884da2c6f6d44b9f549.tar.gz anaconda-cb02fd143ffd4c891c251884da2c6f6d44b9f549.tar.xz anaconda-cb02fd143ffd4c891c251884da2c6f6d44b9f549.zip |
if our waitpids fail for some bizarre reason, don't completely hose us. but log it in case it causes later problems
Diffstat (limited to 'fsset.py')
-rw-r--r-- | fsset.py | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -242,7 +242,8 @@ class FileSystemType: try: (pid, status) = os.waitpid(childpid, 0) except OSError, (num, msg): - print __name__, "waitpid:", msg + log("exception from waitpid in badblocks: %s %s" % (num, msg)) + status = None os.close(fd) w and w.pop() @@ -250,6 +251,10 @@ class FileSystemType: if numbad > 0: raise BadBlocksError + # have no clue how this would happen, but hope we're okay + if status is None: + return + if os.WIFEXITED(status) and (os.WEXITSTATUS(status) == 0): return @@ -2025,11 +2030,16 @@ def ext2FormatFilesystem(argList, messageFile, windowCreator, mntpoint): try: (pid, status) = os.waitpid(childpid, 0) except OSError, (num, msg): - print __name__, "waitpid:", msg + log("exception from waitpid while formatting: %s %s" %(num, msg)) + status = None os.close(fd) w and w.pop() + # *shrug* no clue why this would happen, but hope that things are fine + if status is None: + return 0 + if os.WIFEXITED(status) and (os.WEXITSTATUS(status) == 0): return 0 |