Added correct exception handling to the pre-format check.

This commit is contained in:
Anton Hvornum 2021-02-07 15:31:00 +01:00
parent 3dcf8ced6c
commit 1253982c30
1 changed files with 2 additions and 2 deletions

View File

@ -142,8 +142,8 @@ class Partition():
# in order to determain if we support it or not.
try:
self.format(self.filesystem, '/dev/null')
except DiskError:
pass # We supported it, but /dev/null is not formatable as expected
except SysCallError:
pass # We supported it, but /dev/null is not formatable as expected so the mkfs call exited with an error code
except UnknownFilesystemFormat as err:
raise err