Hi Jeremy and Mark, On Dec 18, 2007 1:44 AM, Mark McLoughlin <[EMAIL PROTECTED]> wrote: > On Sun, 2007-12-16 at 23:58 +0800, Tan Swee Heng wrote: > > > - (string.join(args, " "), ret)) > > + (" ".join(args), ret)) > > Agree with Jeremy - I'm not a fan of this construct; it's just a wee > bit too clever and obtuse for my liking.
Actually I did find it awkward in the past too... but I must have gotten used to it. :-P > > > - l = string.split(hostname, ".") > > + l = hostname.split(".") > > I do prefer this construct, though. Ok since there are two votes in favor of this, here's the updated patch that just modify imgcreate/kickstart.py. I've left fs.py untouched. Feel free to apply / not apply this. It is not a show-stopper bug after all. :-) Swee Heng
Subject: [PATCH] Use string methods in imgcreate/kickstart.py This patch converts the imgcreate/kickstart.py code to use string methods instead of the string module. Signed-off-by: Tan Swee Heng <[EMAIL PROTECTED]> --- imgcreate/kickstart.py | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/imgcreate/kickstart.py b/imgcreate/kickstart.py index 9717d9f..4e96643 100644 --- a/imgcreate/kickstart.py +++ b/imgcreate/kickstart.py @@ -19,7 +19,6 @@ import os import os.path -import string import subprocess import time @@ -296,7 +295,7 @@ class NetworkConfig(KickstartConfig): localline = "" if hostname and hostname != "localhost.localdomain": localline += hostname + " " - l = string.split(hostname, ".") + l = hostname.split(".") if len(l) > 1: localline += l[0] + " " localline += "localhost.localdomain localhost" @@ -357,7 +356,7 @@ class NetworkConfig(KickstartConfig): gateway = network.gateway if network.nameserver: - nameservers = string.split(network.nameserver, ",") + nameservers = network.nameserver.split(",") self.write_sysconfig(useipv6, hostname, gateway) self.write_hosts(hostname) -- 1.5.3.6
-- Fedora-livecd-list mailing list Fedora-livecd-list@redhat.com https://www.redhat.com/mailman/listinfo/fedora-livecd-list