summaryrefslogtreecommitdiffstats
path: root/Lib/tarfile.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/tarfile.py')
-rwxr-xr-xLib/tarfile.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/tarfile.py b/Lib/tarfile.py
index e187da2..e795100 100755
--- a/Lib/tarfile.py
+++ b/Lib/tarfile.py
@@ -2493,7 +2493,9 @@ def is_tarfile(name):
"""
try:
if hasattr(name, "read"):
+ pos = name.tell()
t = open(fileobj=name)
+ name.seek(pos)
else:
t = open(name)
t.close()