Skip to content

Commit b21bfb3

Browse files
committed
Python 3 preparation: avoid string.join().
1 parent 1217b85 commit b21bfb3

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

frontends/roundup.cgi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,14 @@ class RequestWrapper:
140140
# Main CGI handler
141141
#
142142
def main(out, err):
143-
import os, string
143+
import os
144144
import roundup.instance
145145
path = os.environ.get('PATH_INFO', '/').split('/')
146146
request = RequestWrapper(out)
147147
request.path = os.environ.get('PATH_INFO', '/')
148148
tracker = path[1]
149149
os.environ['TRACKER_NAME'] = tracker
150-
os.environ['PATH_INFO'] = string.join(path[2:], '/')
150+
os.environ['PATH_INFO'] = '/'.join(path[2:])
151151
if tracker in TRACKER_HOMES:
152152
# redirect if we need a trailing '/'
153153
if len(path) == 2:

roundup/cgi/apache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def handler(req):
123123
_env = dict(req.subprocess_env)
124124
# XXX classname must be the first item in PATH_INFO. roundup.cgi does:
125125
# path = os.environ.get('PATH_INFO', '/').split('/')
126-
# os.environ['PATH_INFO'] = string.join(path[2:], '/')
126+
# os.environ['PATH_INFO'] = '/'.join(path[2:])
127127
# we just remove the first character ('/')
128128
_env["PATH_INFO"] = req.path_info[1:]
129129
if _timing:

roundup/cgi/cgitb.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from __future__ import print_function
88
__docformat__ = 'restructuredtext'
99

10-
import sys, os, string, keyword, linecache, tokenize, inspect, cgi
10+
import sys, os, keyword, linecache, tokenize, inspect, cgi
1111
import pydoc, traceback
1212

1313
from roundup.cgi import templating, TranslationService
@@ -180,7 +180,7 @@ def linereader(file=file, lnum=[lnum]):
180180
name = '<em>global</em> <strong>%s</strong>' % name
181181
lvals.append('%s&nbsp;= %s'%(name, value))
182182
if lvals:
183-
lvals = string.join(lvals, ', ')
183+
lvals = ', '.join(lvals)
184184
lvals = indent + '<small><font color="#909090">%s'\
185185
'</font></small><br>'%lvals
186186
else:
@@ -200,7 +200,7 @@ def linereader(file=file, lnum=[lnum]):
200200
if i == lnum:
201201
excerpt.append(lvals)
202202
i = i + 1
203-
traceback.append('<p>' + level + string.join(excerpt, '\n'))
203+
traceback.append('<p>' + level + '\n'.join(excerpt))
204204

205205
traceback.reverse()
206206

@@ -210,7 +210,7 @@ def linereader(file=file, lnum=[lnum]):
210210
value = pydoc.html.repr(getattr(evalue, name))
211211
attribs.append('<br>%s%s&nbsp;= %s' % (indent, name, value))
212212

213-
return head + string.join(attribs) + string.join(traceback) + '<p>&nbsp;</p>'
213+
return head + ' '.join(attribs) + ' '.join(traceback) + '<p>&nbsp;</p>'
214214

215215
def handler():
216216
print(breaker())

0 commit comments

Comments
 (0)