summaryrefslogtreecommitdiff
path: root/Lib/tarfile.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/tarfile.py')
-rw-r--r--Lib/tarfile.py26
1 files changed, 13 insertions, 13 deletions
diff --git a/Lib/tarfile.py b/Lib/tarfile.py
index 1685426fbf..feea433703 100644
--- a/Lib/tarfile.py
+++ b/Lib/tarfile.py
@@ -1408,25 +1408,25 @@ class TarFile(object):
for tarinfo in self:
if verbose:
- print filemode(tarinfo.mode),
- print "%s/%s" % (tarinfo.uname or tarinfo.uid,
- tarinfo.gname or tarinfo.gid),
+ print(filemode(tarinfo.mode), end=' ')
+ print("%s/%s" % (tarinfo.uname or tarinfo.uid,
+ tarinfo.gname or tarinfo.gid), end=' ')
if tarinfo.ischr() or tarinfo.isblk():
- print "%10s" % ("%d,%d" \
- % (tarinfo.devmajor, tarinfo.devminor)),
+ print("%10s" % ("%d,%d" \
+ % (tarinfo.devmajor, tarinfo.devminor)), end=' ')
else:
- print "%10d" % tarinfo.size,
- print "%d-%02d-%02d %02d:%02d:%02d" \
- % time.localtime(tarinfo.mtime)[:6],
+ print("%10d" % tarinfo.size, end=' ')
+ print("%d-%02d-%02d %02d:%02d:%02d" \
+ % time.localtime(tarinfo.mtime)[:6], end=' ')
- print tarinfo.name,
+ print(tarinfo.name, end=' ')
if verbose:
if tarinfo.issym():
- print "->", tarinfo.linkname,
+ print("->", tarinfo.linkname, end=' ')
if tarinfo.islnk():
- print "link to", tarinfo.linkname,
- print
+ print("link to", tarinfo.linkname, end=' ')
+ print()
def add(self, name, arcname=None, recursive=True):
"""Add the file `name' to the archive. `name' may be any type of file
@@ -2022,7 +2022,7 @@ class TarFile(object):
"""Write debugging output to sys.stderr.
"""
if level <= self.debug:
- print >> sys.stderr, msg
+ print(msg, file=sys.stderr)
# class TarFile
class TarIter: