From 0c80c69918e1fc3171ae00cafcd8c19f92563f02 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Sat, 11 Jan 2014 15:28:21 -0500 Subject: [PATCH] installer: Drop needless property redirection --- virtinst/distroinstaller.py | 2 +- virtinst/installer.py | 23 +++++------------------ 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/virtinst/distroinstaller.py b/virtinst/distroinstaller.py index ea2caa136..27c6fe630 100644 --- a/virtinst/distroinstaller.py +++ b/virtinst/distroinstaller.py @@ -348,7 +348,7 @@ class DistroInstaller(Installer): self._install_kernel = kernel self._install_initrd = initrd - self._install_args = args + self.extraargs = args ########################### diff --git a/virtinst/installer.py b/virtinst/installer.py index 375670c24..f2192b394 100644 --- a/virtinst/installer.py +++ b/virtinst/installer.py @@ -56,13 +56,14 @@ class Installer(object): def __init__(self, conn): self.conn = conn self._location = None - self._cdrom = False + + self.cdrom = False + self.extraargs = None self.initrd_injections = [] self._install_kernel = None self._install_initrd = None - self._install_args = None # Devices created/added during the prepare() stage self.install_devices = [] @@ -75,26 +76,12 @@ class Installer(object): # Properties properties # ######################### - def get_cdrom(self): - return self._cdrom - def set_cdrom(self, enable): - if enable not in [True, False]: - raise ValueError(_("Guest.cdrom must be a boolean type")) - self._cdrom = enable - cdrom = property(get_cdrom, set_cdrom) - def get_location(self): return self._location def set_location(self, val): self._location = self._validate_location(val) location = property(get_location, set_location) - def get_extra_args(self): - return self._install_args - def set_extra_args(self, val): - self._install_args = val - extraargs = property(get_extra_args, set_extra_args) - ################### # Private helpers # @@ -150,8 +137,8 @@ class Installer(object): bootconfig.kernel = self._install_kernel if self._install_initrd: bootconfig.initrd = self._install_initrd - if self._install_args: - bootconfig.kernel_args = self._install_args + if self.extraargs: + bootconfig.kernel_args = self.extraargs ##########################