eliminate usage of string module
authorMichael 'Mickey' Lauer <mickey@vanille-media.de>
Thu, 1 Apr 2004 21:50:26 +0000 (21:50 +0000)
committerMichael 'Mickey' Lauer <mickey@vanille-media.de>
Thu, 1 Apr 2004 21:50:26 +0000 (21:50 +0000)
bin/oe/parse/SRPMHandler.py
bin/oeimage
bin/oespawn

index 7d04a8d..596ad72 100644 (file)
@@ -2,8 +2,7 @@
 
    Accesses the file and obtains its metadata"""
 
-import re, oe, string, os, sys
-import oe
+import re, oe, os, sys
 import oe.fetch
 from oe import debug, data, fetch, fatal
 from oe.parse.ConfHandler import init
@@ -75,7 +74,7 @@ def set_automatic_vars(file, d, include):
        data.setVar('P', '${PN}-${PV}', d)
        data.setVar('PF', '${P}-${PR}', d)
 
-       for s in ['${TOPDIR}/${CATEGORY}/${PF}', 
+       for s in ['${TOPDIR}/${CATEGORY}/${PF}',
                  '${TOPDIR}/${CATEGORY}/${PN}-${PV}',
                  '${TOPDIR}/${CATEGORY}/files',
                  '${TOPDIR}/${CATEGORY}']:
@@ -115,7 +114,7 @@ def set_additional_vars(file, d, include):
 
        a += fetch.localpaths(d)
        del fetch
-       data.setVar('A', string.join(a), d)
+       data.setVar('A', ''.join(a), d)
 
 
 # Add us to the handlers list
index 242891c..0de013b 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-import sys, os, string, oe
+import sys, os, oe
 from oe import *
 
 __version__ = 1.0
index 34cec0f..ef268f5 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-import sys, os, string, getopt, copy, oe
+import sys, os, getopt, copy, oe
 from oe import *
 
 def usage():
@@ -104,21 +104,21 @@ for b in builders.split():
        if oedir != curdir:
                os.chdir(oedir)
 
-       oefiles = string.split(data.getVar('OEFILES', localdata, 1) or "")
+       oefiles = (data.getVar('OEFILES', localdata, 1) or "").split()
        if len(oefiles) == 0:
                fatal("OEFILES not defined")
 
        # output OEDIR/conf/auto.conf
        mkdirhier(os.path.join(oedir, 'conf'))
        fd = file('%s/conf/auto.conf' % oedir, 'w')
-       fd.write("BUILDER=%s\n" % b) 
+       fd.write("BUILDER=%s\n" % b)
        fd.write("include %s\n" % cfgfn)
        fd.close()
 
-       oepath = string.split(data.getVar('OEPATH', localdata, 1) or "", ":")
+       oepath = (data.getVar('OEPATH', localdata, 1) or "").split(':')
        oepath.append(curdir)
        os.environ["OEDIR"] = oedir
-       os.environ["OEPATH"] = string.join(oepath, ":")
+       os.environ["OEPATH"] = ':'.join(oepath)
 
        # spawn oemake .. into the background, we need not wait() for it
        pid = os.fork()