upip: Update utarfile module (support reading an open stream).

pull/106/head
Paul Sokolovsky 2016-09-27 03:15:25 -07:00
rodzic 7315442c7b
commit b6bfd9963d
1 zmienionych plików z 5 dodań i 2 usunięć

Wyświetl plik

@ -45,8 +45,11 @@ class TarInfo:
class TarFile:
def __init__(self, name):
self.f = open(name, "rb")
def __init__(self, name=None, fileobj=None):
if fileobj:
self.f = fileobj
else:
self.f = open(name, "rb")
self.subf = None
def next(self):