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 --- 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