diff options
author | PMR <pmr@pmr-lander> | 2019-10-10 17:16:43 +0000 |
---|---|---|
committer | PMR <pmr@pmr-lander> | 2019-10-10 17:16:43 +0000 |
commit | 16864d5d15d2bac586f0962dfa380de8b2802bfe (patch) | |
tree | d41361469f288f693078a9a0c2975be3cac8fced | |
parent | 073d5a4f2b32497e29ed6363e6364f9fee365f43 (diff) | |
parent | 3cacb219d0545f8e7472d9b83c0c6e28ab301904 (diff) |
Merge #373752 from ~jocave/plainbox-provider-checkbox:fix-1846690
-rwxr-xr-x | bin/storage_test.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/storage_test.py b/bin/storage_test.py index 3dbc87f8..dbc0552c 100755 --- a/bin/storage_test.py +++ b/bin/storage_test.py @@ -31,6 +31,9 @@ def find_largest_partition(device): blk_devs = [BlkDev(*p.strip().split()) for p in out.decode(sys.stdout.encoding).splitlines()] blk_devs[:] = [bd for bd in blk_devs if bd.type == 'part'] + if not blk_devs: + raise SystemExit( + 'ERROR: No partitions found on device {}'.format(device)) blk_devs.sort(key=lambda bd: int(bd.size)) return blk_devs[-1].name |