Issue #20238: TarFile opened with external fileobj and "w:gz" mode didn't

write complete output on close.
This commit is contained in:
Serhiy Storchaka 2014-01-18 15:53:05 +02:00
parent 53ad0cd284
commit 9fbec7ad5e
3 changed files with 10 additions and 1 deletions

View file

@ -1642,7 +1642,7 @@ class TarFile(object):
if not extfileobj and fileobj is not None:
fileobj.close()
raise
t._extfileobj = extfileobj
t._extfileobj = False
return t
@classmethod