summaryrefslogtreecommitdiffstats
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/objects/disks.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/cli/objects/disks.py b/cli/objects/disks.py
index 77955fa..deaf5b3 100644
--- a/cli/objects/disks.py
+++ b/cli/objects/disks.py
@@ -134,8 +134,9 @@ class OgDisk():
'format': do_format}
payload['partition_setup'].append(part)
+ last_partnum = int(parsed_args.part[-1][0][0])
# Pad with empty partitions if no 4th part was defined
- for i in range(len(parsed_args.part)+1, 5):
+ for i in range(last_partnum + 1, 5):
part = {'partition': str(i), 'code':'EMPTY',
'filesystem': 'EMPTY', 'size': '0',
'format': '0'}