diff options
| author | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2005-11-29 23:12:22 +0000 |
|---|---|---|
| committer | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2005-11-29 23:12:22 +0000 |
| commit | 1413b01974f156dc51c45a72256dc609cf4163f3 (patch) | |
| tree | b91f5a862290a5c7568fcf09fd95d0beb541eb8b /lib/python | |
| parent | 06020d8995eae2f7a4c926d0dd0b485485eea861 (diff) | |
| download | enigma2-1413b01974f156dc51c45a72256dc609cf4163f3.tar.gz enigma2-1413b01974f156dc51c45a72256dc609cf4163f3.zip | |
catch errors when unmounting
Diffstat (limited to 'lib/python')
| -rw-r--r-- | lib/python/Components/Harddisk.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/python/Components/Harddisk.py b/lib/python/Components/Harddisk.py index 0fc17d69..09864fc9 100644 --- a/lib/python/Components/Harddisk.py +++ b/lib/python/Components/Harddisk.py @@ -103,7 +103,8 @@ class Harddisk: def unmount(self): cmd = "/bin/umount " + self.devidex + "part*" - os.system(cmd) + res = os.system(cmd) + return (res >> 8) def createPartition(self): cmd = "/sbin/sfdisk -f " + self.devidex + "disc" @@ -127,7 +128,8 @@ class Harddisk: return (res >> 8) def initialize(self): - self.unmount() + if self.unmount() != 0: + return -5 if self.createPartition() != 0: return -1 |
