diff frontends/roundup.cgi @ 5433:86b6cea7a975

Python 3 preparation: avoid string.split().
author Joseph Myers <jsm@polyomino.org.uk>
date Wed, 25 Jul 2018 10:42:42 +0000
parents 55f09ca366c4
children 1ab2c81a64df
line wrap: on
line diff
--- a/frontends/roundup.cgi	Wed Jul 25 10:41:32 2018 +0000
+++ b/frontends/roundup.cgi	Wed Jul 25 10:42:42 2018 +0000
@@ -86,7 +86,7 @@
 # Check environment for config items
 #
 def checkconfig():
-    import os, string
+    import os
     global TRACKER_HOMES, LOG
 
     # see if there's an environment var. ROUNDUP_INSTANCE_HOMES is the
@@ -97,9 +97,9 @@
         homes = os.environ.get('TRACKER_HOMES', '')
     if homes:
         TRACKER_HOMES = {}
-        for home in string.split(homes, os.pathsep):
+        for home in homes.split(os.pathsep):
             try:
-                name, dir = string.split(home, '=', 1)
+                name, dir = home.split('=', 1)
             except ValueError:
                 # ignore invalid definitions
                 continue
@@ -142,7 +142,7 @@
 def main(out, err):
     import os, string
     import roundup.instance
-    path = string.split(os.environ.get('PATH_INFO', '/'), '/')
+    path = os.environ.get('PATH_INFO', '/').split('/')
     request = RequestWrapper(out)
     request.path = os.environ.get('PATH_INFO', '/')
     tracker = path[1]

Roundup Issue Tracker: http://roundup-tracker.org/