diff roundup/cgi/TAL/HTMLParser.py @ 5377:12fe83f90f0d

Python 3 preparation: use repr() instead of ``. Tool-generated patch.
author Joseph Myers <jsm@polyomino.org.uk>
date Tue, 24 Jul 2018 21:36:02 +0000
parents 63868084b8bb
children d26921b851c3
line wrap: on
line diff
--- a/roundup/cgi/TAL/HTMLParser.py	Tue Jul 24 09:54:52 2018 +0000
+++ b/roundup/cgi/TAL/HTMLParser.py	Tue Jul 24 21:36:02 2018 +0000
@@ -285,7 +285,7 @@
             else:
                 offset = offset + len(self.__starttag_text)
             self.error("junk characters in start tag: %s"
-                       % `rawdata[k:endpos][:20]`)
+                       % repr(rawdata[k:endpos][:20]))
         if end[-2:] == '/>':
             # XHTML-style empty tag: <span attr="value" />
             self.handle_startendtag(tag, attrs)
@@ -337,7 +337,7 @@
         j = match.end()
         match = endtagfind.match(rawdata, i) # </ + tag + >
         if not match:
-            self.error("bad end tag: %s" % `rawdata[i:j]`)
+            self.error("bad end tag: %s" % repr(rawdata[i:j]))
         tag = match.group(1).lower()
         if (  self.cdata_endtag is not None
               and tag != self.cdata_endtag):
@@ -388,7 +388,7 @@
         pass
 
     def unknown_decl(self, data):
-        self.error("unknown declaration: " + `data`)
+        self.error("unknown declaration: " + repr(data))
 
     # Internal -- helper to remove special character quoting
     def unescape(self, s):

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