From a393fe10280cf8202cb3acfc1b8df606158d7966 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Mon, 16 Oct 2006 11:45:53 -0400 Subject: Trailing whitespace. --- cobbler/action_enchant.py | 2 +- cobbler/action_import.py | 8 ++++---- cobbler/action_sync.py | 28 ++++++++++++++-------------- cobbler/api.py | 2 +- cobbler/cobbler.py | 2 +- cobbler/cobbler_msg.py | 2 +- cobbler/item_distro.py | 6 +++--- cobbler/item_system.py | 4 ++-- 8 files changed, 27 insertions(+), 27 deletions(-) (limited to 'cobbler') diff --git a/cobbler/action_enchant.py b/cobbler/action_enchant.py index 03ad987..fed102a 100644 --- a/cobbler/action_enchant.py +++ b/cobbler/action_enchant.py @@ -34,7 +34,7 @@ class Enchant: raise cexception.CobblerException("enchant_failed","no system name specified") self.profile = '' self.password = password - + def call(self,cmd): """ Invoke something over SSH. diff --git a/cobbler/action_import.py b/cobbler/action_import.py index 109a49c..0f9c46c 100644 --- a/cobbler/action_import.py +++ b/cobbler/action_import.py @@ -29,7 +29,7 @@ import api # for FC5 is sent everywhere. That probably WON'T work in most # places even though it's a minimalistic kickstart. This will # get patched over time. -MATCH_LIST = ( +MATCH_LIST = ( ( "1/" , "/etc/cobbler/kickstart_fc5.ks" ), ( "2/" , "/etc/cobbler/kickstart_fc5.ks" ), ( "3/" , "/etc/cobbler/kickstart_fc5.ks" ), @@ -94,7 +94,7 @@ class Importer: second: remove any profiles that depend on distros that don't exist systems will be left as orphans as the MAC info may be useful to the sysadmin and may not be recorded elsewhere. We will report - the orphaned systems. + the orphaned systems. FIXME: this should also be a seperate API command! """ print "*** SCRUBBING ORPHANS" @@ -134,14 +134,14 @@ class Importer: kpath = distro.kernel if not kpath.startswith("/var/www/cobbler"): print "*** CAN'T GUESS (kpath): %s" % kpath - continue + continue for entry in MATCH_LIST: (part, kickstart) = entry if kpath.find(part) != -1: print "*** CONSIDERING: %s" % kickstart if os.path.exists(kickstart): print "*** ASSIGNING kickstart: %s" % kickstart - profile.set_kickstart(kickstart) + profile.set_kickstart(kickstart) # from the kernel path, the tree path is always two up. # FIXME: that's probably not always true dirname = os.path.dirname(kpath) diff --git a/cobbler/action_sync.py b/cobbler/action_sync.py index 4fda5b3..d18dc71 100644 --- a/cobbler/action_sync.py +++ b/cobbler/action_sync.py @@ -72,7 +72,7 @@ class BootSync: if retcode != 0: print >>sys.stderr, "Warning: dhcpd restart failed" except OSError, e: - print >>sys.stderr, "Warning: dhcpd restart failed: ", e + print >>sys.stderr, "Warning: dhcpd restart failed: ", e return True def copy_koan(self): @@ -89,7 +89,7 @@ class BootSync: """ Copy bootloaders to the configured tftpboot directory NOTE: we support different arch's if defined in - /var/lib/cobbler/settings. + /var/lib/cobbler/settings. """ for loader in self.settings.bootloaders.keys(): path = self.settings.bootloaders[loader] @@ -110,8 +110,8 @@ class BootSync: f1 = self.open_file("/etc/dhcpd.conf","w+") template_data = f2.read() f2.close() - - # build each per-system definition + + # build each per-system definition system_definitions = "" counter = 0 elilo = os.path.basename(self.settings.bootloaders["ia64"]) @@ -124,7 +124,7 @@ class BootSync: # the MAC as the system name. continue systxt = "" - counter = counter + 1 + counter = counter + 1 systxt = "\nhost label%d {\n" % counter profile = self.profiles.find(system.profile) distro = self.distros.find(profile.distro) @@ -179,7 +179,7 @@ class BootSync: def clean_trees(self): """ Delete any previously built pxelinux.cfg tree and xen tree info. - + Note: for SELinux reasons, some information goes in /tftpboot, some in /var/www/cobbler and some must be duplicated in both. This is because PXE needs tftp, and auto-kickstart and Xen operations need http. Only the kernel and initrd images are duplicated, which is @@ -346,7 +346,7 @@ class BootSync: Usually it's just one or the other. """ - + self.sync_log(cobbler_msg.lookup("sync_buildtree")) self.write_listings() @@ -390,7 +390,7 @@ class BootSync: f1 = self.get_pxe_filename(system.name) # tftp only - + if distro.arch in [ "x86", "x86_64", "standard"]: # pxelinux wants a file named $name under pxelinux.cfg @@ -401,10 +401,10 @@ class BootSync: if system.pxe_address == "" or system.pxe_address is None or not utils.is_ip(system.pxe_address): raise cexceptions.CobblerException("exc_ia64_noip",system.name) - - filename = "%s.conf" % self.get_pxe_filename(system.pxe_address) + + filename = "%s.conf" % self.get_pxe_filename(system.pxe_address) f2 = os.path.join(self.settings.tftpboot, filename) - + f3 = os.path.join(self.settings.webdir, "systems", f1) if distro.arch in [ "x86", "x86_64", "standard"]: @@ -461,7 +461,7 @@ class BootSync: self.tee(fd,"\tinitrd=%s\n" % initrd_path) self.tee(fd,"\tread-only\n") self.tee(fd,"\troot=/dev/ram\n") - + # now build the kernel command line kopts = self.blend_options(True,( self.settings.kernel_options, @@ -477,7 +477,7 @@ class BootSync: # for ia64, it's already done if not is_ia64: append_line = "%s initrd=%s" % (append_line,initrd_path) - + # kickstart path (if kickstart is used) if kickstart_path is not None and kickstart_path != "": # if kickstart path is on disk, we've already copied it into @@ -600,7 +600,7 @@ class BootSync: return shutil.copy(src,dst) except IOError, ioe: raise cexceptions.CobblerException("need_perms2",src,dst) - + def rmfile(self,path): """ For dryrun support. potentially unlink a file. diff --git a/cobbler/api.py b/cobbler/api.py index fae5d64..bc95a29 100644 --- a/cobbler/api.py +++ b/cobbler/api.py @@ -111,7 +111,7 @@ class BootAPI: def enchant(self,sysname,password): """ Apply a system profile to a running remote system, replacing - the current OS. + the current OS. """ enchant = action_enchant.Enchant(self._config,sysname,password) return enchant.run() diff --git a/cobbler/cobbler.py b/cobbler/cobbler.py index d31924c..6ce5661 100755 --- a/cobbler/cobbler.py +++ b/cobbler/cobbler.py @@ -125,7 +125,7 @@ class BootCLI: def system_enchant(self,args): """ - Reinstall a system: + Reinstall a system: 'cobbler system enchant --name='foo' [--password='foo'] """ self.temp_password = '' diff --git a/cobbler/cobbler_msg.py b/cobbler/cobbler_msg.py index dee3611..5f9ea91 100644 --- a/cobbler/cobbler_msg.py +++ b/cobbler/cobbler_msg.py @@ -82,7 +82,7 @@ _msg_table = { "exc_profile2" : "profile name not set", "exc_pxe_arch" : "valid PXE architectures: standard or ia64", "exc_no_template" : "can't read /etc/cobbler/dhcp.template", - "exc_dhcp_nomac" : "when cobbler is managing dhcpd.conf, all system names must be MAC addresses. Aborting.", + "exc_dhcp_nomac" : "when cobbler is managing dhcpd.conf, all system names must be MAC addresses. Aborting.", "exc_ia64_noip" : "due to an IA64 bootloader limitation, system (%s) must define a pxe-address value (which is an IP address)", "lock" : "Locked. If cobbler is currently running, wait for termination, otherwise remove /var/lib/cobbler/lock", "check_ok" : """ diff --git a/cobbler/item_distro.py b/cobbler/item_distro.py index 9af47f4..2c85790 100644 --- a/cobbler/item_distro.py +++ b/cobbler/item_distro.py @@ -81,10 +81,10 @@ class Distro(item.Item): Should someone have Itanium machines on a network, having syslinux (pxelinux.0) be the only option in the config file causes - problems. + problems. - Using an alternative distro type allows for dhcpd.conf templating - to "do the right thing" with those systems -- this also relates to + Using an alternative distro type allows for dhcpd.conf templating + to "do the right thing" with those systems -- this also relates to bootloader configuration files which have different syntax for different distro types (because of the bootloaders). diff --git a/cobbler/item_system.py b/cobbler/item_system.py index 74ea7c7..8a5c604 100644 --- a/cobbler/item_system.py +++ b/cobbler/item_system.py @@ -56,10 +56,10 @@ class System(item.Item): # restricting to address as IP only in dhcpd.conf is probably # incorrect ... some people may want to pin the hostname instead. # doing so, however, doesn't allow dhcpd.conf to be managed - # by cobbler (since elilo can't do MAC addresses) -- this is + # by cobbler (since elilo can't do MAC addresses) -- this is # covered in the man page. if not utils.is_ip(address) and not utils.is_mac(address): - raise cexceptions.CobblerException("bad_ip") + raise cexceptions.CobblerException("bad_ip") self.pxe_address = address return True -- cgit