diff options
author | mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> | 2007-08-28 18:17:34 +0000 |
---|---|---|
committer | mbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4> | 2007-08-28 18:17:34 +0000 |
commit | 89dfdc5918d6b31a25bd4cb401e44543e94b26cf (patch) | |
tree | 3828386071ee56db2f9915ba8d5e8657637be8d6 /client | |
parent | 859d665697459f80b4671e0d3192ef5a5c975485 (diff) |
Fix exception handling in filesystems class
Signed-off-by: Martin J. Bligh <mbligh@google.com>
git-svn-id: svn://test.kernel.org/autotest/trunk@635 592f7852-d20e-0410-864c-8624ca9c26a4
Diffstat (limited to 'client')
-rwxr-xr-x | client/bin/filesystem.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/client/bin/filesystem.py b/client/bin/filesystem.py index 6b8513a2..a4c697b4 100755 --- a/client/bin/filesystem.py +++ b/client/bin/filesystem.py @@ -78,18 +78,17 @@ class filesystem: system("yes | " + mkfs_cmd) except: self.job.record("FAIL " + mkfs_cmd) + raise else: self.job.record("GOOD " + mkfs_cmd) self.fstype = fstype - def fsck(self, args = ''): fsck = 'fsck %s %s' % (self.device, args) print fsck sys.stdout.flush() - ret = system(fsck, ignorestatus=1) - return not ret + system(fsck) def mount(self, mountpoint = None, args = ''): @@ -125,7 +124,13 @@ class filesystem: umount_cmd = "umount " + handle print umount_cmd sys.stdout.flush() - system(umount_cmd) + try: + system(umount_cmd) + except: + self.job.record("FAIL " + umount_cmd) + raise + else: + self.job.record("GOOD " + umount_cmd) def get_io_scheduler_list(self, device_name): |