diff options
author | Walter Dörwald <walter@livinglogic.de> | 2004-02-12 17:35:32 (GMT) |
---|---|---|
committer | Walter Dörwald <walter@livinglogic.de> | 2004-02-12 17:35:32 (GMT) |
commit | 70a6b49821a3226f55e9716f32d802d06640cb89 (patch) | |
tree | 3c8ca10c1fa09e025bd266cf855a00d7d96c55aa /Tools/scripts/checkappend.py | |
parent | ecfeb7f095dfd9c1c8929bf3df858ee35e0d9e9e (diff) | |
download | cpython-70a6b49821a3226f55e9716f32d802d06640cb89.zip cpython-70a6b49821a3226f55e9716f32d802d06640cb89.tar.gz cpython-70a6b49821a3226f55e9716f32d802d06640cb89.tar.bz2 |
Replace backticks with repr() or "%r"
From SF patch #852334.
Diffstat (limited to 'Tools/scripts/checkappend.py')
-rwxr-xr-x | Tools/scripts/checkappend.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Tools/scripts/checkappend.py b/Tools/scripts/checkappend.py index b3141df..a8714d9 100755 --- a/Tools/scripts/checkappend.py +++ b/Tools/scripts/checkappend.py @@ -65,7 +65,7 @@ def main(): def check(file): if os.path.isdir(file) and not os.path.islink(file): if verbose: - print "%s: listing directory" % `file` + print "%r: listing directory" % (file,) names = os.listdir(file) for name in names: fullname = os.path.join(file, name) @@ -78,15 +78,15 @@ def check(file): try: f = open(file) except IOError, msg: - errprint("%s: I/O Error: %s" % (`file`, str(msg))) + errprint("%r: I/O Error: %s" % (file, msg)) return if verbose > 1: - print "checking", `file`, "..." + print "checking %r ..." % (file,) ok = AppendChecker(file, f).run() if verbose and ok: - print "%s: Clean bill of health." % `file` + print "%r: Clean bill of health." % (file,) [FIND_DOT, FIND_APPEND, @@ -105,7 +105,7 @@ class AppendChecker: try: tokenize.tokenize(self.file.readline, self.tokeneater) except tokenize.TokenError, msg: - errprint("%s: Token Error: %s" % (`self.fname`, str(msg))) + errprint("%r: Token Error: %s" % (self.fname, msg)) self.nerrors = self.nerrors + 1 return self.nerrors == 0 @@ -159,7 +159,7 @@ class AppendChecker: state = FIND_DOT else: - raise SystemError("unknown internal state '%s'" % `state`) + raise SystemError("unknown internal state '%r'" % (state,)) self.state = state |