diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2012-07-11 08:40:44 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2012-07-11 12:16:15 +0100 |
commit | e6e13838f4f488af063b8bd060c5b34a82cb309b (patch) | |
tree | dbfc69bcfb293e0322407ebdd8f0ed263fafaa60 /morphlib/builder2.py | |
parent | c730e4292cc5f436aa40cbfdf57e121a89472a8b (diff) | |
download | morph-e6e13838f4f488af063b8bd060c5b34a82cb309b.tar.gz |
SystemBuild: remove check for if arch == None
This should never happen any more, so the check is now redundant.
This may have a negligible performance benefit, but it prevents the
code implying that None is a valid architecture.
Diffstat (limited to 'morphlib/builder2.py')
-rw-r--r-- | morphlib/builder2.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/morphlib/builder2.py b/morphlib/builder2.py index 36bcd7b6..03a62144 100644 --- a/morphlib/builder2.py +++ b/morphlib/builder2.py @@ -490,13 +490,13 @@ class SystemBuilder(BuilderBase): # pragma: no cover self._create_subvolume(factory_path) self._unpack_strata(factory_path) self._create_fstab(factory_path) - if arch in ('x86', 'x86_64', None): + if arch in ('x86', 'x86_64'): self._create_extlinux_config(factory_path) self._create_subvolume_snapshot( mount_point, 'factory', 'factory-run') factory_run_path = os.path.join(mount_point, 'factory-run') self._install_boot_files(arch, factory_run_path, mount_point) - if arch in ('x86', 'x86_64', None): + if arch in ('x86', 'x86_64'): self._install_extlinux(mount_point) if arch in ('arm',): a = self.new_artifact( @@ -540,7 +540,7 @@ class SystemBuilder(BuilderBase): # pragma: no cover def _install_mbr(self, arch, image_name): self.app.status(msg='Installing mbr on disk image %(filename)s', filename=image_name, chatty=True) - if arch not in ('x86', 'x86_64', None): + if arch not in ('x86', 'x86_64'): return with self.build_watch('install-mbr'): morphlib.fsutils.install_syslinux_mbr(self.app.runcmd, image_name) @@ -658,7 +658,7 @@ class SystemBuilder(BuilderBase): # pragma: no cover def _install_boot_files(self, arch, sourcefs, targetfs): with self.build_watch('install-boot-files'): - if arch in ('x86', 'x86_64', None): + if arch in ('x86', 'x86_64'): self.app.status(msg='Installing boot files into root volume', chatty=True) shutil.copy2(os.path.join(sourcefs, 'extlinux.conf'), |