Skip to content

Commit b6bfd99

Browse files
committed
upip: Update utarfile module (support reading an open stream).
1 parent 7315442 commit b6bfd99

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

upip/upip_utarfile.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,11 @@ def __str__(self):
4545

4646
class TarFile:
4747

48-
def __init__(self, name):
49-
self.f = open(name, "rb")
48+
def __init__(self, name=None, fileobj=None):
49+
if fileobj:
50+
self.f = fileobj
51+
else:
52+
self.f = open(name, "rb")
5053
self.subf = None
5154

5255
def next(self):

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy