comparison roundup/cgi/cgitb.py @ 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 7172c201dec2
children 1ab2c81a64df
comparison
equal deleted inserted replaced
5432:fec18298ae02 5433:86b6cea7a975
110 def html(context=5, i18n=None): 110 def html(context=5, i18n=None):
111 _ = get_translator(i18n) 111 _ = get_translator(i18n)
112 etype, evalue = sys.exc_info()[0], sys.exc_info()[1] 112 etype, evalue = sys.exc_info()[0], sys.exc_info()[1]
113 if type(etype) is type: 113 if type(etype) is type:
114 etype = etype.__name__ 114 etype = etype.__name__
115 pyver = 'Python ' + string.split(sys.version)[0] + '<br>' + sys.executable 115 pyver = 'Python ' + sys.version.split()[0] + '<br>' + sys.executable
116 head = pydoc.html.heading( 116 head = pydoc.html.heading(
117 _('<font size=+1><strong>%(exc_type)s</strong>: %(exc_value)s</font>') 117 _('<font size=+1><strong>%(exc_type)s</strong>: %(exc_value)s</font>')
118 % {'exc_type': etype, 'exc_value': evalue}, 118 % {'exc_type': etype, 'exc_value': evalue},
119 '#ffffff', '#777777', pyver) 119 '#ffffff', '#777777', pyver)
120 120

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