From a61770a341075fc9dd499cc11de344fae6b76334 Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov Date: Fri, 22 Mar 2019 18:15:05 +0000 Subject: [PATCH] Respect the order of arguments, never reshuffle. --- subiquity/controllers/filesystem.py | 4 ++-- subiquity/models/filesystem.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/subiquity/controllers/filesystem.py b/subiquity/controllers/filesystem.py index abb3282e..40a37160 100644 --- a/subiquity/controllers/filesystem.py +++ b/subiquity/controllers/filesystem.py @@ -207,8 +207,8 @@ class FilesystemController(BaseController): self.delete_mount(fs.mount()) self.model.remove_filesystem(fs) - def create_partition(self, device, spec, wipe=None, flag=""): - part = self.model.add_partition(device, spec["size"], wipe, flag) + def create_partition(self, device, spec, flag="", wipe=None): + part = self.model.add_partition(device, spec["size"], flag, wipe) self.create_filesystem(part, spec) return part diff --git a/subiquity/models/filesystem.py b/subiquity/models/filesystem.py index 390f6154..bf7d3297 100644 --- a/subiquity/models/filesystem.py +++ b/subiquity/models/filesystem.py @@ -954,7 +954,7 @@ class FilesystemModel(object): def all_devices(self): return self.all_disks() + self.all_raids() + self.all_volgroups() - def add_partition(self, disk, size, wipe=None, flag=""): + def add_partition(self, disk, size, flag="", wipe=None): if size > disk.free_for_partitions: raise Exception("%s > %s", size, disk.free_for_partitions) real_size = align_up(size) @@ -963,7 +963,7 @@ class FilesystemModel(object): self._use_disk(disk) if disk._fs is not None: raise Exception("%s is already formatted" % (disk.label,)) - p = Partition(device=disk, size=real_size, wipe=wipe, flag=flag) + p = Partition(device=disk, size=real_size, flag=flag, wipe=wipe) if flag in ("boot", "bios_grub", "prep"): disk._partitions.insert(0, p) else: