summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2002-07-11 04:02:51 +0000
committerJeremy Katz <katzj@redhat.com>2002-07-11 04:02:51 +0000
commitcb02fd143ffd4c891c251884da2c6f6d44b9f549 (patch)
tree099ef8d2a3d413bf91d5c538d2ae630c6f8c8409
parente038e90dbeb9cc2b5f75cb232b90e51c4a4fac9d (diff)
downloadanaconda-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
-rw-r--r--fsset.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/fsset.py b/fsset.py
index 8c8556f5c..bcc96b7d0 100644
--- a/fsset.py
+++ b/fsset.py
@@ -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