/usr/lib64/python3.9/__pycache__
NameSizeModeActions
abc.cpython-39.opt-1.pyc57750644editdlrm
abc.cpython-39.opt-2.pyc32160644editdlrm
abc.cpython-39.pyc57750644editdlrm
aifc.cpython-39.opt-1.pyc252660644editdlrm
aifc.cpython-39.opt-2.pyc200590644editdlrm
aifc.cpython-39.pyc252660644editdlrm
antigravity.cpython-39.opt-1.pyc8190644editdlrm
antigravity.cpython-39.opt-2.pyc6750644editdlrm
antigravity.cpython-39.pyc8190644editdlrm
argparse.cpython-39.opt-1.pyc635430644editdlrm
argparse.cpython-39.opt-2.pyc541790644editdlrm
argparse.cpython-39.pyc636540644editdlrm
ast.cpython-39.opt-1.pyc523320644editdlrm
ast.cpython-39.opt-2.pyc437870644editdlrm
ast.cpython-39.pyc523830644editdlrm
asynchat.cpython-39.opt-1.pyc68220644editdlrm
asynchat.cpython-39.opt-2.pyc54470644editdlrm
asynchat.cpython-39.pyc68220644editdlrm
asyncore.cpython-39.opt-1.pyc160360644editdlrm
asyncore.cpython-39.opt-2.pyc148320644editdlrm
asyncore.cpython-39.pyc160360644editdlrm
base64.cpython-39.opt-1.pyc163230644editdlrm
base64.cpython-39.opt-2.pyc108030644editdlrm
base64.cpython-39.pyc164550644editdlrm
bdb.cpython-39.opt-1.pyc245400644editdlrm
bdb.cpython-39.opt-2.pyc155030644editdlrm
bdb.cpython-39.pyc245400644editdlrm
binhex.cpython-39.opt-1.pyc129650644editdlrm
binhex.cpython-39.opt-2.pyc124310644editdlrm
binhex.cpython-39.pyc129650644editdlrm
bisect.cpython-39.opt-1.pyc23500644editdlrm
bisect.cpython-39.opt-2.pyc10380644editdlrm
bisect.cpython-39.pyc23500644editdlrm
bz2.cpython-39.opt-1.pyc115450644editdlrm
bz2.cpython-39.opt-2.pyc65290644editdlrm
bz2.cpython-39.pyc115450644editdlrm
calendar.cpython-39.opt-1.pyc270310644editdlrm
calendar.cpython-39.opt-2.pyc224390644editdlrm
calendar.cpython-39.pyc270310644editdlrm
cgi.cpython-39.opt-1.pyc264820644editdlrm
cgi.cpython-39.opt-2.pyc180560644editdlrm
cgi.cpython-39.pyc264820644editdlrm
cgitb.cpython-39.opt-1.pyc101860644editdlrm
cgitb.cpython-39.opt-2.pyc85870644editdlrm
cgitb.cpython-39.pyc101860644editdlrm
chunk.cpython-39.opt-1.pyc48410644editdlrm
chunk.cpython-39.opt-2.pyc26970644editdlrm
chunk.cpython-39.pyc48410644editdlrm
cmd.cpython-39.opt-1.pyc126760644editdlrm
cmd.cpython-39.opt-2.pyc72510644editdlrm
cmd.cpython-39.pyc126760644editdlrm
code.cpython-39.opt-1.pyc99160644editdlrm
code.cpython-39.opt-2.pyc46450644editdlrm
code.cpython-39.pyc99160644editdlrm
codecs.cpython-39.opt-1.pyc338880644editdlrm
codecs.cpython-39.opt-2.pyc183160644editdlrm
codecs.cpython-39.pyc338880644editdlrm
codeop.cpython-39.opt-1.pyc64580644editdlrm
codeop.cpython-39.opt-2.pyc23980644editdlrm
codeop.cpython-39.pyc64580644editdlrm
colorsys.cpython-39.opt-1.pyc32600644editdlrm
colorsys.cpython-39.opt-2.pyc26540644editdlrm
colorsys.cpython-39.pyc32600644editdlrm
compileall.cpython-39.opt-1.pyc125890644editdlrm
compileall.cpython-39.opt-2.pyc93300644editdlrm
compileall.cpython-39.pyc125890644editdlrm
configparser.cpython-39.opt-1.pyc458690644editdlrm
configparser.cpython-39.opt-2.pyc307290644editdlrm
configparser.cpython-39.pyc458690644editdlrm
contextlib.cpython-39.opt-1.pyc195280644editdlrm
contextlib.cpython-39.opt-2.pyc139430644editdlrm
contextlib.cpython-39.pyc195380644editdlrm
contextvars.cpython-39.opt-1.pyc2450644editdlrm
contextvars.cpython-39.opt-2.pyc2450644editdlrm
contextvars.cpython-39.pyc2450644editdlrm
copy.cpython-39.opt-1.pyc69630644editdlrm
copy.cpython-39.opt-2.pyc46600644editdlrm
copy.cpython-39.pyc69630644editdlrm
copyreg.cpython-39.opt-1.pyc44110644editdlrm
copyreg.cpython-39.opt-2.pyc36090644editdlrm
copyreg.cpython-39.pyc44300644editdlrm
cProfile.cpython-39.opt-1.pyc51160644editdlrm
cProfile.cpython-39.opt-2.pyc46550644editdlrm
cProfile.cpython-39.pyc51160644editdlrm
crypt.cpython-39.opt-1.pyc35130644editdlrm
crypt.cpython-39.opt-2.pyc28510644editdlrm
crypt.cpython-39.pyc35130644editdlrm
csv.cpython-39.opt-1.pyc118490644editdlrm
csv.cpython-39.opt-2.pyc98080644editdlrm
csv.cpython-39.pyc118490644editdlrm
dataclasses.cpython-39.opt-1.pyc232170644editdlrm
dataclasses.cpython-39.opt-2.pyc197780644editdlrm
dataclasses.cpython-39.pyc232170644editdlrm
datetime.cpython-39.opt-1.pyc569740644editdlrm
datetime.cpython-39.opt-2.pyc485300644editdlrm
datetime.cpython-39.pyc581150644editdlrm
decimal.cpython-39.opt-1.pyc3590644editdlrm
decimal.cpython-39.opt-2.pyc3590644editdlrm
decimal.cpython-39.pyc3590644editdlrm
difflib.cpython-39.opt-1.pyc585580644editdlrm
difflib.cpython-39.opt-2.pyc250240644editdlrm
difflib.cpython-39.pyc585800644editdlrm
dis.cpython-39.opt-1.pyc158200644editdlrm
dis.cpython-39.opt-2.pyc120130644editdlrm
dis.cpython-39.pyc158200644editdlrm
doctest.cpython-39.opt-1.pyc758320644editdlrm
doctest.cpython-39.opt-2.pyc405260644editdlrm
doctest.cpython-39.pyc760390644editdlrm
enum.cpython-39.opt-1.pyc260200644editdlrm
enum.cpython-39.opt-2.pyc210980644editdlrm
enum.cpython-39.pyc260200644editdlrm
filecmp.cpython-39.opt-1.pyc86220644editdlrm
filecmp.cpython-39.opt-2.pyc60840644editdlrm
filecmp.cpython-39.pyc86220644editdlrm
fileinput.cpython-39.opt-1.pyc137900644editdlrm
fileinput.cpython-39.opt-2.pyc81820644editdlrm
fileinput.cpython-39.pyc137900644editdlrm
fnmatch.cpython-39.opt-1.pyc38700644editdlrm
fnmatch.cpython-39.opt-2.pyc26620644editdlrm
fnmatch.cpython-39.pyc39420644editdlrm
formatter.cpython-39.opt-1.pyc175390644editdlrm
formatter.cpython-39.opt-2.pyc150990644editdlrm
formatter.cpython-39.pyc175390644editdlrm
fractions.cpython-39.opt-1.pyc180490644editdlrm
fractions.cpython-39.opt-2.pyc108490644editdlrm
fractions.cpython-39.pyc180490644editdlrm
ftplib.cpython-39.opt-1.pyc286940644editdlrm
ftplib.cpython-39.opt-2.pyc185500644editdlrm
ftplib.cpython-39.pyc286940644editdlrm
functools.cpython-39.opt-1.pyc287230644editdlrm
functools.cpython-39.opt-2.pyc220020644editdlrm
functools.cpython-39.pyc287230644editdlrm
genericpath.cpython-39.opt-1.pyc45410644editdlrm
genericpath.cpython-39.opt-2.pyc33580644editdlrm
genericpath.cpython-39.pyc45410644editdlrm
getopt.cpython-39.opt-1.pyc62420644editdlrm
getopt.cpython-39.opt-2.pyc36880644editdlrm
getopt.cpython-39.pyc62600644editdlrm
getpass.cpython-39.opt-1.pyc42000644editdlrm
getpass.cpython-39.opt-2.pyc30140644editdlrm
getpass.cpython-39.pyc42000644editdlrm
gettext.cpython-39.opt-1.pyc180730644editdlrm
gettext.cpython-39.opt-2.pyc173820644editdlrm
gettext.cpython-39.pyc180730644editdlrm
glob.cpython-39.opt-1.pyc45050644editdlrm
glob.cpython-39.opt-2.pyc36450644editdlrm
glob.cpython-39.pyc45440644editdlrm
graphlib.cpython-39.opt-1.pyc75220644editdlrm
graphlib.cpython-39.opt-2.pyc40860644editdlrm
graphlib.cpython-39.pyc75680644editdlrm
gzip.cpython-39.opt-1.pyc184940644editdlrm
gzip.cpython-39.opt-2.pyc146270644editdlrm
gzip.cpython-39.pyc184940644editdlrm
hashlib.cpython-39.opt-1.pyc52050644editdlrm
hashlib.cpython-39.opt-2.pyc48800644editdlrm
hashlib.cpython-39.pyc52050644editdlrm
heapq.cpython-39.opt-1.pyc140400644editdlrm
heapq.cpython-39.opt-2.pyc110240644editdlrm
heapq.cpython-39.pyc140400644editdlrm
hmac.cpython-39.opt-1.pyc71230644editdlrm
hmac.cpython-39.opt-2.pyc46040644editdlrm
hmac.cpython-39.pyc71230644editdlrm
imaplib.cpython-39.opt-1.pyc405070644editdlrm
imaplib.cpython-39.opt-2.pyc278240644editdlrm
imaplib.cpython-39.pyc426880644editdlrm
imghdr.cpython-39.opt-1.pyc41400644editdlrm
imghdr.cpython-39.opt-2.pyc38250644editdlrm
imghdr.cpython-39.pyc41400644editdlrm
imp.cpython-39.opt-1.pyc98510644editdlrm
imp.cpython-39.opt-2.pyc74860644editdlrm
imp.cpython-39.pyc98510644editdlrm
inspect.cpython-39.opt-1.pyc812300644editdlrm
inspect.cpython-39.opt-2.pyc561020644editdlrm
inspect.cpython-39.pyc814720644editdlrm
io.cpython-39.opt-1.pyc34080644editdlrm
io.cpython-39.opt-2.pyc19190644editdlrm
io.cpython-39.pyc34080644editdlrm
ipaddress.cpython-39.opt-1.pyc656820644editdlrm
ipaddress.cpython-39.opt-2.pyc397020644editdlrm
ipaddress.cpython-39.pyc656820644editdlrm
keyword.cpython-39.opt-1.pyc9160644editdlrm
keyword.cpython-39.opt-2.pyc5120644editdlrm
keyword.cpython-39.pyc9160644editdlrm
linecache.cpython-39.opt-1.pyc40280644editdlrm
linecache.cpython-39.opt-2.pyc27950644editdlrm
linecache.cpython-39.pyc40280644editdlrm
locale.cpython-39.opt-1.pyc346960644editdlrm
locale.cpython-39.opt-2.pyc300780644editdlrm
locale.cpython-39.pyc346960644editdlrm
lzma.cpython-39.opt-1.pyc120940644editdlrm
lzma.cpython-39.opt-2.pyc58960644editdlrm
lzma.cpython-39.pyc120940644editdlrm
mailbox.cpython-39.opt-1.pyc605460644editdlrm
mailbox.cpython-39.opt-2.pyc539420644editdlrm
mailbox.cpython-39.pyc606000644editdlrm
mailcap.cpython-39.opt-1.pyc72390644editdlrm
mailcap.cpython-39.opt-2.pyc56690644editdlrm
mailcap.cpython-39.pyc72390644editdlrm
mimetypes.cpython-39.opt-1.pyc160150644editdlrm
mimetypes.cpython-39.opt-2.pyc100000644editdlrm
mimetypes.cpython-39.pyc160150644editdlrm
modulefinder.cpython-39.opt-1.pyc160820644editdlrm
modulefinder.cpython-39.opt-2.pyc151730644editdlrm
modulefinder.cpython-39.pyc161280644editdlrm
netrc.cpython-39.opt-1.pyc37830644editdlrm
netrc.cpython-39.opt-2.pyc35450644editdlrm
netrc.cpython-39.pyc37830644editdlrm
nntplib.cpython-39.opt-1.pyc317630644editdlrm
nntplib.cpython-39.opt-2.pyc201630644editdlrm
nntplib.cpython-39.pyc317630644editdlrm
ntpath.cpython-39.opt-1.pyc142710644editdlrm
ntpath.cpython-39.opt-2.pyc122200644editdlrm
ntpath.cpython-39.pyc142710644editdlrm
nturl2path.cpython-39.opt-1.pyc17460644editdlrm
nturl2path.cpython-39.opt-2.pyc13270644editdlrm
nturl2path.cpython-39.pyc17460644editdlrm
numbers.cpython-39.opt-1.pyc123190644editdlrm
numbers.cpython-39.opt-2.pyc83620644editdlrm
numbers.cpython-39.pyc123190644editdlrm
opcode.cpython-39.opt-1.pyc52230644editdlrm
opcode.cpython-39.opt-2.pyc50820644editdlrm
opcode.cpython-39.pyc52230644editdlrm
operator.cpython-39.opt-1.pyc137840644editdlrm
operator.cpython-39.opt-2.pyc113950644editdlrm
operator.cpython-39.pyc137840644editdlrm
optparse.cpython-39.opt-1.pyc478880644editdlrm
optparse.cpython-39.opt-2.pyc355730644editdlrm
optparse.cpython-39.pyc479430644editdlrm
os.cpython-39.opt-1.pyc316300644editdlrm
os.cpython-39.opt-2.pyc194400644editdlrm
os.cpython-39.pyc316460644editdlrm
pathlib.cpython-39.opt-1.pyc435280644editdlrm
pathlib.cpython-39.opt-2.pyc346680644editdlrm
pathlib.cpython-39.pyc435280644editdlrm
pdb.cpython-39.opt-1.pyc475470644editdlrm
pdb.cpython-39.opt-2.pyc334760644editdlrm
pdb.cpython-39.pyc475860644editdlrm
pickle.cpython-39.opt-1.pyc470120644editdlrm
pickle.cpython-39.opt-2.pyc411420644editdlrm
pickle.cpython-39.pyc470980644editdlrm
pickletools.cpython-39.opt-1.pyc662930644editdlrm
pickletools.cpython-39.opt-2.pyc572000644editdlrm
pickletools.cpython-39.pyc671070644editdlrm
pipes.cpython-39.opt-1.pyc77950644editdlrm
pipes.cpython-39.opt-2.pyc49280644editdlrm
pipes.cpython-39.pyc77950644editdlrm
pkgutil.cpython-39.opt-1.pyc185660644editdlrm
pkgutil.cpython-39.opt-2.pyc118670644editdlrm
pkgutil.cpython-39.pyc185660644editdlrm
platform.cpython-39.opt-1.pyc264160644editdlrm
platform.cpython-39.opt-2.pyc183480644editdlrm
platform.cpython-39.pyc264160644editdlrm
plistlib.cpython-39.opt-1.pyc234960644editdlrm
plistlib.cpython-39.opt-2.pyc211370644editdlrm
plistlib.cpython-39.pyc235470644editdlrm
poplib.cpython-39.opt-1.pyc137540644editdlrm
poplib.cpython-39.opt-2.pyc88240644editdlrm
poplib.cpython-39.pyc137540644editdlrm
posixpath.cpython-39.opt-1.pyc106420644editdlrm
posixpath.cpython-39.opt-2.pyc89270644editdlrm
posixpath.cpython-39.pyc106420644editdlrm
pprint.cpython-39.opt-1.pyc167970644editdlrm
pprint.cpython-39.opt-2.pyc146400644editdlrm
pprint.cpython-39.pyc168300644editdlrm
profile.cpython-39.opt-1.pyc142230644editdlrm
profile.cpython-39.opt-2.pyc112450644editdlrm
profile.cpython-39.pyc144110644editdlrm
pstats.cpython-39.opt-1.pyc237520644editdlrm
pstats.cpython-39.opt-2.pyc208430644editdlrm
pstats.cpython-39.pyc237520644editdlrm
pty.cpython-39.opt-1.pyc39560644editdlrm
pty.cpython-39.opt-2.pyc31110644editdlrm
pty.cpython-39.pyc39560644editdlrm
pyclbr.cpython-39.opt-1.pyc104490644editdlrm
pyclbr.cpython-39.opt-2.pyc68480644editdlrm
pyclbr.cpython-39.pyc104490644editdlrm
pydoc.cpython-39.opt-1.pyc854280644editdlrm
pydoc.cpython-39.opt-2.pyc755460644editdlrm
pydoc.cpython-39.pyc854600644editdlrm
py_compile.cpython-39.opt-1.pyc73960644editdlrm
py_compile.cpython-39.opt-2.pyc36580644editdlrm
py_compile.cpython-39.pyc73960644editdlrm
queue.cpython-39.opt-1.pyc108760644editdlrm
queue.cpython-39.opt-2.pyc65260644editdlrm
queue.cpython-39.pyc108760644editdlrm
quopri.cpython-39.opt-1.pyc56030644editdlrm
quopri.cpython-39.opt-2.pyc45670644editdlrm
quopri.cpython-39.pyc57470644editdlrm
random.cpython-39.opt-1.pyc220430644editdlrm
random.cpython-39.opt-2.pyc145960644editdlrm
random.cpython-39.pyc220430644editdlrm
re.cpython-39.opt-1.pyc143620644editdlrm
re.cpython-39.opt-2.pyc60240644editdlrm
re.cpython-39.pyc143620644editdlrm
reprlib.cpython-39.opt-1.pyc53070644editdlrm
reprlib.cpython-39.opt-2.pyc51510644editdlrm
reprlib.cpython-39.pyc53070644editdlrm
rlcompleter.cpython-39.opt-1.pyc58060644editdlrm
rlcompleter.cpython-39.opt-2.pyc31430644editdlrm
rlcompleter.cpython-39.pyc58060644editdlrm
runpy.cpython-39.opt-1.pyc93850644editdlrm
runpy.cpython-39.opt-2.pyc69430644editdlrm
runpy.cpython-39.pyc93850644editdlrm
sched.cpython-39.opt-1.pyc66330644editdlrm
sched.cpython-39.opt-2.pyc36050644editdlrm
sched.cpython-39.pyc66330644editdlrm
secrets.cpython-39.opt-1.pyc21800644editdlrm
secrets.cpython-39.opt-2.pyc11220644editdlrm
secrets.cpython-39.pyc21800644editdlrm
selectors.cpython-39.opt-1.pyc172450644editdlrm
selectors.cpython-39.opt-2.pyc131360644editdlrm
selectors.cpython-39.pyc172450644editdlrm
shelve.cpython-39.opt-1.pyc95440644editdlrm
shelve.cpython-39.opt-2.pyc53930644editdlrm
shelve.cpython-39.pyc95440644editdlrm
shlex.cpython-39.opt-1.pyc77340644editdlrm
shlex.cpython-39.opt-2.pyc71760644editdlrm
shlex.cpython-39.pyc77340644editdlrm
shutil.cpython-39.opt-1.pyc384970644editdlrm
shutil.cpython-39.opt-2.pyc264290644editdlrm
shutil.cpython-39.pyc384970644editdlrm
signal.cpython-39.opt-1.pyc30060644editdlrm
signal.cpython-39.opt-2.pyc27820644editdlrm
signal.cpython-39.pyc30060644editdlrm
site.cpython-39.opt-1.pyc172290644editdlrm
site.cpython-39.opt-2.pyc115550644editdlrm
site.cpython-39.pyc172290644editdlrm
smtpd.cpython-39.opt-1.pyc265240644editdlrm
smtpd.cpython-39.opt-2.pyc239040644editdlrm
smtpd.cpython-39.pyc265240644editdlrm
smtplib.cpython-39.opt-1.pyc358850644editdlrm
smtplib.cpython-39.opt-2.pyc195230644editdlrm
smtplib.cpython-39.pyc359300644editdlrm
sndhdr.cpython-39.opt-1.pyc69930644editdlrm
sndhdr.cpython-39.opt-2.pyc57180644editdlrm
sndhdr.cpython-39.pyc69930644editdlrm
socket.cpython-39.opt-1.pyc289760644editdlrm
socket.cpython-39.opt-2.pyc204370644editdlrm
socket.cpython-39.pyc290000644editdlrm
socketserver.cpython-39.opt-1.pyc255150644editdlrm
socketserver.cpython-39.opt-2.pyc147990644editdlrm
socketserver.cpython-39.pyc255150644editdlrm
sre_compile.cpython-39.opt-1.pyc149590644editdlrm
sre_compile.cpython-39.opt-2.pyc145450644editdlrm
sre_compile.cpython-39.pyc151540644editdlrm
sre_constants.cpython-39.opt-1.pyc63360644editdlrm
sre_constants.cpython-39.opt-2.pyc59110644editdlrm
sre_constants.cpython-39.pyc63360644editdlrm
sre_parse.cpython-39.opt-1.pyc217720644editdlrm
sre_parse.cpython-39.opt-2.pyc217240644editdlrm
sre_parse.cpython-39.pyc218090644editdlrm
ssl.cpython-39.opt-1.pyc451060644editdlrm
ssl.cpython-39.opt-2.pyc341220644editdlrm
ssl.cpython-39.pyc451060644editdlrm
stat.cpython-39.opt-1.pyc43720644editdlrm
stat.cpython-39.opt-2.pyc35890644editdlrm
stat.cpython-39.pyc43720644editdlrm
statistics.cpython-39.opt-1.pyc317840644editdlrm
statistics.cpython-39.opt-2.pyc159110644editdlrm
statistics.cpython-39.pyc319780644editdlrm
string.cpython-39.opt-1.pyc71650644editdlrm
string.cpython-39.opt-2.pyc60590644editdlrm
string.cpython-39.pyc71650644editdlrm
stringprep.cpython-39.opt-1.pyc99460644editdlrm
stringprep.cpython-39.opt-2.pyc97280644editdlrm
stringprep.cpython-39.pyc99860644editdlrm
struct.cpython-39.opt-1.pyc3060644editdlrm
struct.cpython-39.opt-2.pyc3060644editdlrm
struct.cpython-39.pyc3060644editdlrm
subprocess.cpython-39.opt-1.pyc443100644editdlrm
subprocess.cpython-39.opt-2.pyc322720644editdlrm
subprocess.cpython-39.pyc443860644editdlrm
sunau.cpython-39.opt-1.pyc168170644editdlrm
sunau.cpython-39.opt-2.pyc122270644editdlrm
sunau.cpython-39.pyc168170644editdlrm
symbol.cpython-39.opt-1.pyc25790644editdlrm
symbol.cpython-39.opt-2.pyc25030644editdlrm
symbol.cpython-39.pyc25790644editdlrm
symtable.cpython-39.opt-1.pyc110880644editdlrm
symtable.cpython-39.opt-2.pyc103590644editdlrm
symtable.cpython-39.pyc111660644editdlrm
sysconfig.cpython-39.opt-1.pyc162040644editdlrm
sysconfig.cpython-39.opt-2.pyc138260644editdlrm
sysconfig.cpython-39.pyc162040644editdlrm
tabnanny.cpython-39.opt-1.pyc70650644editdlrm
tabnanny.cpython-39.opt-2.pyc61320644editdlrm
tabnanny.cpython-39.pyc70650644editdlrm
tarfile.cpython-39.opt-1.pyc737630644editdlrm
tarfile.cpython-39.opt-2.pyc585050644editdlrm
tarfile.cpython-39.pyc737780644editdlrm
telnetlib.cpython-39.opt-1.pyc183310644editdlrm
telnetlib.cpython-39.opt-2.pyc108290644editdlrm
telnetlib.cpython-39.pyc183310644editdlrm
tempfile.cpython-39.opt-1.pyc236560644editdlrm
tempfile.cpython-39.opt-2.pyc171300644editdlrm
tempfile.cpython-39.pyc236560644editdlrm
textwrap.cpython-39.opt-1.pyc134630644editdlrm
textwrap.cpython-39.opt-2.pyc62540644editdlrm
textwrap.cpython-39.pyc135210644editdlrm
this.cpython-39.opt-1.pyc12590644editdlrm
this.cpython-39.opt-2.pyc12590644editdlrm
this.cpython-39.pyc12590644editdlrm
threading.cpython-39.opt-1.pyc417160644editdlrm
threading.cpython-39.opt-2.pyc245290644editdlrm
threading.cpython-39.pyc421810644editdlrm
timeit.cpython-39.opt-1.pyc117560644editdlrm
timeit.cpython-39.opt-2.pyc59020644editdlrm
timeit.cpython-39.pyc117560644editdlrm
token.cpython-39.opt-1.pyc24960644editdlrm
token.cpython-39.opt-2.pyc24630644editdlrm
token.cpython-39.pyc24960644editdlrm
tokenize.cpython-39.opt-1.pyc171370644editdlrm
tokenize.cpython-39.opt-2.pyc133730644editdlrm
tokenize.cpython-39.pyc171650644editdlrm
trace.cpython-39.opt-1.pyc197590644editdlrm
trace.cpython-39.opt-2.pyc167440644editdlrm
trace.cpython-39.pyc197590644editdlrm
traceback.cpython-39.opt-1.pyc204400644editdlrm
traceback.cpython-39.opt-2.pyc114870644editdlrm
traceback.cpython-39.pyc204400644editdlrm
tracemalloc.cpython-39.opt-1.pyc179350644editdlrm
tracemalloc.cpython-39.opt-2.pyc165220644editdlrm
tracemalloc.cpython-39.pyc179350644editdlrm
tty.cpython-39.opt-1.pyc10780644editdlrm
tty.cpython-39.opt-2.pyc9690644editdlrm
tty.cpython-39.pyc10780644editdlrm
types.cpython-39.opt-1.pyc92360644editdlrm
types.cpython-39.opt-2.pyc80140644editdlrm
types.cpython-39.pyc92360644editdlrm
typing.cpython-39.opt-1.pyc718050644editdlrm
typing.cpython-39.opt-2.pyc505570644editdlrm
typing.cpython-39.pyc719350644editdlrm
uu.cpython-39.opt-1.pyc38470644editdlrm
uu.cpython-39.opt-2.pyc36030644editdlrm
uu.cpython-39.pyc38470644editdlrm
uuid.cpython-39.opt-1.pyc223970644editdlrm
uuid.cpython-39.opt-2.pyc146840644editdlrm
uuid.cpython-39.pyc225100644editdlrm
warnings.cpython-39.opt-1.pyc131660644editdlrm
warnings.cpython-39.opt-2.pyc108910644editdlrm
warnings.cpython-39.pyc136050644editdlrm
wave.cpython-39.opt-1.pyc178440644editdlrm
wave.cpython-39.opt-2.pyc118520644editdlrm
wave.cpython-39.pyc178730644editdlrm
weakref.cpython-39.opt-1.pyc202710644editdlrm
weakref.cpython-39.opt-2.pyc169860644editdlrm
weakref.cpython-39.pyc202850644editdlrm
webbrowser.cpython-39.opt-1.pyc175650644editdlrm
webbrowser.cpython-39.opt-2.pyc150860644editdlrm
webbrowser.cpython-39.pyc175820644editdlrm
xdrlib.cpython-39.opt-1.pyc82430644editdlrm
xdrlib.cpython-39.opt-2.pyc77580644editdlrm
xdrlib.cpython-39.pyc82430644editdlrm
zipapp.cpython-39.opt-1.pyc59850644editdlrm
zipapp.cpython-39.opt-2.pyc48090644editdlrm
zipapp.cpython-39.pyc59850644editdlrm
zipfile.cpython-39.opt-1.pyc598670644editdlrm
zipfile.cpython-39.opt-2.pyc508790644editdlrm
zipfile.cpython-39.pyc598880644editdlrm
zipimport.cpython-39.opt-1.pyc171590644editdlrm
zipimport.cpython-39.opt-2.pyc136410644editdlrm
zipimport.cpython-39.pyc172370644editdlrm
_aix_support.cpython-39.opt-1.pyc30460644editdlrm
_aix_support.cpython-39.opt-2.pyc16910644editdlrm
_aix_support.cpython-39.pyc30460644editdlrm
_bootlocale.cpython-39.opt-1.pyc12170644editdlrm
_bootlocale.cpython-39.opt-2.pyc9920644editdlrm
_bootlocale.cpython-39.pyc12270644editdlrm
_bootsubprocess.cpython-39.opt-1.pyc22450644editdlrm
_bootsubprocess.cpython-39.opt-2.pyc20160644editdlrm
_bootsubprocess.cpython-39.pyc22450644editdlrm
_collections_abc.cpython-39.opt-1.pyc317310644editdlrm
_collections_abc.cpython-39.opt-2.pyc262410644editdlrm
_collections_abc.cpython-39.pyc317310644editdlrm
_compat_pickle.cpython-39.opt-1.pyc54350644editdlrm
_compat_pickle.cpython-39.opt-2.pyc54350644editdlrm
_compat_pickle.cpython-39.pyc54880644editdlrm
_compression.cpython-39.opt-1.pyc41980644editdlrm
_compression.cpython-39.opt-2.pyc39840644editdlrm
_compression.cpython-39.pyc41980644editdlrm
_markupbase.cpython-39.opt-1.pyc76260644editdlrm
_markupbase.cpython-39.opt-2.pyc72480644editdlrm
_markupbase.cpython-39.pyc77770644editdlrm
_osx_support.cpython-39.opt-1.pyc115820644editdlrm
_osx_support.cpython-39.opt-2.pyc88920644editdlrm
_osx_support.cpython-39.pyc115820644editdlrm
_pydecimal.cpython-39.opt-1.pyc1606130644editdlrm
_pydecimal.cpython-39.opt-2.pyc789960644editdlrm
_pydecimal.cpython-39.pyc1606130644editdlrm
_pyio.cpython-39.opt-1.pyc743670644editdlrm
_pyio.cpython-39.opt-2.pyc515700644editdlrm
_pyio.cpython-39.pyc743870644editdlrm
_py_abc.cpython-39.opt-1.pyc46340644editdlrm
_py_abc.cpython-39.opt-2.pyc34210644editdlrm
_py_abc.cpython-39.pyc46560644editdlrm
_sitebuiltins.cpython-39.opt-1.pyc35010644editdlrm
_sitebuiltins.cpython-39.opt-2.pyc29770644editdlrm
_sitebuiltins.cpython-39.pyc35010644editdlrm
_strptime.cpython-39.opt-1.pyc160150644editdlrm
_strptime.cpython-39.opt-2.pyc122870644editdlrm
_strptime.cpython-39.pyc160150644editdlrm
_sysconfigdata__linux_x86_64-linux-gnu.cpython-39.opt-1.pyc307880644editdlrm
_sysconfigdata__linux_x86_64-linux-gnu.cpython-39.opt-2.pyc307880644editdlrm
_sysconfigdata__linux_x86_64-linux-gnu.cpython-39.pyc307880644editdlrm
_threading_local.cpython-39.opt-1.pyc65060644editdlrm
_threading_local.cpython-39.opt-2.pyc31860644editdlrm
_threading_local.cpython-39.pyc65060644editdlrm
_weakrefset.cpython-39.opt-1.pyc77240644editdlrm
_weakrefset.cpython-39.opt-2.pyc77240644editdlrm
_weakrefset.cpython-39.pyc77240644editdlrm
__future__.cpython-39.opt-1.pyc41260644editdlrm
__future__.cpython-39.opt-2.pyc21540644editdlrm
__future__.cpython-39.pyc41260644editdlrm
__phello__.foo.cpython-39.opt-1.pyc1290644editdlrm
__phello__.foo.cpython-39.opt-2.pyc1290644editdlrm
__phello__.foo.cpython-39.pyc1290644editdlrm
Edit: /usr/lib64/python3.9/__pycache__/tarfile.cpython-39.opt-1.pyc (73763B)
a |j @sdZdZdZdZddlmZddlZddlZddl Z ddl Z ddl Z ddl Z ddl Z ddlZddlZddlZz ddlZWneydZYn0z ddlZWneydZYn0eefZzeef7ZWneyYn0gdZdZd Zd Zd Zed Zd ZdZ dZ!dZ"dZ#dZ$d Z%dZ&dZ'dZ(dZ)dZ*dZ+dZ,dZ-dZ.dZ/dZ0dZ1dZ2dZ3dZ4d Z5e5Z6e$e%e&e'e*e+e,e(e)e-e.e/f Z7e$e%e,e/fZ8e-e.e/fZ9d!Z:hd"Z;eej?d$krd%Z@neAZ@d&d'ZBd(d)ZCd*d+ZDd,e6fd-d.ZEd/d0ZFdedfd1d2ZGd3d4ZHGd5d6d6eIZJGd7d8d8eJZKGd9d:d:eJZLGd;d<dd>eJZNGd?d@d@eJZOGdAdBdBeOZPGdCdDdDeOZQGdEdFdFeOZRGdGdHdHeOZSGdIdJdJeOZTGdKdLdLZUGdMdNdNZVGdOdPdPeWZXGdQdRdReWZYGdSdTdTe jZZ[GdUdVdVeJZ\GdWdXdXe\Z]GdYdZdZe\Z^Gd[d\d\e\Z_Gd]d^d^e\Z`Gd_d`d`e\ZaGdadbdbe\Zbe\eeKfZcdvdcddZddedfZedgdhZfdidjZgeeefegdkZheWZiejdlZkGdmdndneWZlGdodpdpeWZmdqdrZnemjZdsdtZoepdukr eodS)wz,Read from and write to tar format archives. z0.9.0u"Lars Gustäbel (lars@gustaebel.de)u4Gustavo Niemeyer, Niels Gustäbel, Richard Townsend.)openN)TarFileTarInfo is_tarfileTarError ReadErrorCompressionError StreamError ExtractError HeaderErrorENCODING USTAR_FORMAT GNU_FORMAT PAX_FORMATDEFAULT_FORMATrTz/etc/python/tarfile.cfgisustar sustar00d01234567LKSxgX)pathlinkpathsizemtimeuidgidunamegname>r&r,r+r%)Zatimectimer(r)r*r'ntutf-8cCs8|durtd|||}|d||t|tS)z8Convert a string to a null-terminated bytes object. Nzmetadata cannot contain None) ValueErrorencodelenNUL)slengthencodingerrorsr8/usr/lib64/python3.9/tarfile.pystns r:cCs*|d}|dkr|d|}|||S)z8Convert a null-terminated bytes object to a string. rN)finddecode)r4r6r7pr8r8r9ntss  r?cCs|ddvrbd}tt|dD]}|dK}|||d7}q |ddkrdt|d| }n>z"t|dd}t|p|d d}Wntytd Yn0|S) z/Convert a number field to a python number. r)r#rAasciistrict0invalid header)ranger2r?intstripr0InvalidHeaderError)r4nir8r8r9ntis    rNrBcCst|}d|kr$d|dkrDnntd|d|fdt}n|tkrd|d |krrd|dkrnnV|dkrtdg}ntdg}d||}t|dD]}|d|d@|dL}qntd |S) z/Convert a python number to a number field. rrBr#z%0*orDrCr@rAzoverflow in number field)rIbytesr3r bytearrayrHinsertr0)rLdigitsformatr4rMr8r8r9itns  2    rTcCs0dttd|}dttd|}||fS)aCalculate the checksum for a member's header by summing up all characters except for the chksum field which is treated as if it was filled with spaces. According to the GNU tar sources, some tars (Sun and NeXT) calculate chksum with signed char, which will be different if there are chars in the buffer with the high bit set. So we calculate two checksums, unsigned and signed. rCZ 148B8x356BZ 148b8x356b)sumstruct unpack_from)bufZunsigned_chksumZ signed_chksumr8r8r9 calc_chksumss rYc Cs|pd}|dkrdS|dur.t|||dSt||\}}t|D],}||}t||krf|d||qD|dkr||}t||kr|d||dS)zjCopy length bytes from fileobj src to fileobj dst. If length is None, copy the entire content. i@rNunexpected end of data)shutil copyfileobjdivmodrHreadr2write) srcdstr5 exceptionbufsizeblocks remainderbrXr8r8r9r\s$       r\cCs8ttjdd}|dur(||d|}t|dddS)Nr6backslashreplace )end)getattrsysstdoutr1r=print)r4r6r8r8r9 _safe_printsrnc@seZdZdZdS)rzBase exception.N__name__ __module__ __qualname____doc__r8r8r8r9rsrc@seZdZdZdS)r z%General exception for extract errors.Nror8r8r8r9r sr c@seZdZdZdS)rz&Exception for unreadable tar archives.Nror8r8r8r9rsrc@seZdZdZdS)rz.Exception for unavailable compression methods.Nror8r8r8r9rsrc@seZdZdZdS)r z=Exception for unsupported operations on stream-like TarFiles.Nror8r8r8r9r !sr c@seZdZdZdS)r z!Base exception for header errors.Nror8r8r8r9r $sr c@seZdZdZdS)EmptyHeaderErrorzException for empty headers.Nror8r8r8r9rt'srtc@seZdZdZdS)TruncatedHeaderErrorz Exception for truncated headers.Nror8r8r8r9ru*sruc@seZdZdZdS)EOFHeaderErrorz"Exception for end of file headers.Nror8r8r8r9rv-srvc@seZdZdZdS)rKzException for invalid headers.Nror8r8r8r9rK0srKc@seZdZdZdS)SubsequentHeaderErrorz3Exception for missing and invalid extended headers.Nror8r8r8r9rw3srwc@s0eZdZdZddZddZddZdd Zd S) _LowLevelFilezLow-level file object. Supports reading and writing. It is used instead of a regular file object for streaming access. cCsFtjtjtjBtjBd|}ttdr2|tjO}t||d|_dS)NrwO_BINARYi) osO_RDONLYO_WRONLYO_CREATO_TRUNChasattrr|rfd)selfnamemoder8r8r9__init__@s  z_LowLevelFile.__init__cCst|jdSN)r}closerrr8r8r9rIsz_LowLevelFile.closecCst|j|Sr)r}r^rrr'r8r8r9r^Lsz_LowLevelFile.readcCst|j|dSr)r}r_rrr4r8r8r9r_Osz_LowLevelFile.writeN)rprqrrrsrrr^r_r8r8r8r9rx:s  rxc@sreZdZdZddZddZddZdd Zd d Zd d Z ddZ ddZ dddZ ddZ ddZddZdS)_StreamaClass that serves as an adapter between TarFile and a stream-like object. The stream-like object only needs to have a read() or write() method and is accessed blockwise. Use of gzip or bzip2 compression is possible. A stream-like object could be for example: sys.stdin, sys.stdout, a socket, a tape device etc. _Stream is intended to be used only internally. c Csd|_|durt||}d|_|dkr6t|}|}|pd|fg}d|_g|_d}|j}|D]L\}}||kr||j d||df|j d||||f||7}||}qX||jkr|j d||jdfdS)NrrFT) roffsetr'positionrjrr map_indexmapr)rrrr'Z blockinfoZlastposZrealposr8r8r9rhs(    z_FileInFile.__init__cCsdSrr8rr8r8r9rsz_FileInFile.flushcCsdSNTr8rr8r8r9readablesz_FileInFile.readablecCsdS)NFr8rr8r8r9writablesz_FileInFile.writablecCs |jSr)rseekablerr8r8r9rsz_FileInFile.seekablecCs|jS)z*Return the current file position. )rrr8r8r9rsz_FileInFile.tellcCs|tjkr tt|d|j|_nj|tjkr\|dkrFt|j|d|_qt|j||j|_n.|tjkrtt|j||jd|_ntd|jS)z(Seek to a position in the file. rzInvalid argument) ioSEEK_SETminmaxr'rSEEK_CURSEEK_ENDr0)rrwhencer8r8r9rs   z_FileInFile.seekc Cs |dur|j|j}nt||j|j}d}|dkr|j|j\}}}}||jkr`|krhqnqq6|jd7_|jt|jkr6d|_q6t|||j}|r|j||j||j|}t||krt d||7}n |t |7}||8}|j|7_q,|S)z!Read data from the file. Nrrr#rZ) r'rrrrr2rrr^rr3) rr'rXdatastartstoprr5rfr8r8r9r^s,     z_FileInFile.readcCs&|t|}||dt|<t|Sr)r^r2)rrfrXr8r8r9readintosz_FileInFile.readintocCs d|_dSr)rrr8r8r9rsz_FileInFile.close)N)N)rprqrrrsrrrrrrrrrr^rrr8r8r8r9rbs  rcseZdZfddZZS) ExFileObjectcs&t|j|j|j|j}t|dSr)rr offset_datar'sparsesuperr)rtarfiletarinfor __class__r8r9rs zExFileObject.__init__rprqrrr __classcell__r8r8rr9rsrc@s eZdZdS) FilterErrorN)rprqrrr8r8r8r9rsrcseZdZfddZZS)AbsolutePathErrorcs ||_td|jddS)Nzmember z has an absolute pathrrrrrrrr8r9rszAbsolutePathError.__init__rr8r8rr9rsrcseZdZfddZZS)OutsideDestinationErrorcs.||_||_t|jd|dddS)Nz would be extracted to , which is outside the destinationr_pathrrrrrr%rr8r9rs z OutsideDestinationError.__init__rr8r8rr9rsrcseZdZfddZZS)SpecialFileErrorcs||_t|jddS)Nz is a special filerrrr8r9rszSpecialFileError.__init__rr8r8rr9rsrcseZdZfddZZS)AbsoluteLinkErrorcs||_t|jddS)Nz is a link to an absolute pathrrrr8r9rszAbsoluteLinkError.__init__rr8r8rr9rsrcseZdZfddZZS)LinkOutsideDestinationErrorcs.||_||_t|jd|dddS)Nz would link to rrrrrr8r9rs z$LinkOutsideDestinationError.__init__rr8r8rr9rsrcseZdZfddZZS)LinkFallbackErrorcs2||_||_td|jdd|ddS)Nzlink z would be extracted as a zcopy of z, which was rejectedrrrr8r9rs  zLinkFallbackError.__init__rr8r8rr9rsrcCs"i}|j}tjj|tjjd}|dtjfrH|jdtj}|d<tj|r\t |tjjtj ||tjjd}tj ||g|krt |||j }|dur|d@}|r|s|r|d@s|dM}|dO}n|s|rd}nt|||j kr||d<|r|jdur*d|d <|jdur>d|d <|jdurRd|d <|jdurfd|d <|sz|rtj|jrt|tj|j}||jkr||d <|rtj |tj||j}ntj ||j}tjj|tjjd}tj ||g|krt|||S)N)rE/ri@irr)r*r+r,linkname)rr}r%realpath ALLOW_MISSINGrseplstripisabsrr commonpathrrisregislnkisdirissymrr)r*r+r,rrnormpathdirnamer)member dest_pathZfor_data new_attrsrZ target_pathrZ normalizedr8r8r9_get_filtered_attrssl             rcCs|Srr8)rrr8r8r9fully_trusted_filterGsrcCs,t||d}|r(|jfi|ddiS|S)NFdeeprrrrrr8r8r9 tar_filterJs rcCs,t||d}|r(|jfi|ddiS|S)NTrFrrr8r8r9 data_filterPs r)Z fully_trustedrrs([0-9]{1,20}) c@seZdZdZedddddddd d d d d dddddddddZdiddZeddZej ddZeddZ e j ddZ ddZ e e e e e e e e d e d! d"d#Z d$d%Zeed&fd'd(Zd)d*Zd+d,Zd-d.Zed/d0Zd1d2Zed3d4Zed5d6Zed7d8Zed9d:Zed;d<Zed=d>Zd?d@ZdAdBZ dCdDZ!dEdFZ"dGdHZ#dIdJZ$dKdLZ%dMdNZ&dOdPZ'dQdRZ(dSdTZ)dUdVZ*dWdXZ+dYdZZ,d[d\Z-d]d^Z.d_d`Z/dadbZ0dcddZ1dedfZ2dgdhZ3dS)jraInformational class which holds the details about an archive member given by a tar header block. TarInfo objects are returned by TarFile.getmember(), TarFile.getmembers() and TarFile.gettarinfo() and are usually created internally. zName of the archive member.zPermission bits.z6User ID of the user who originally stored this member.z7Group ID of the user who originally stored this member.zSize in bytes.zTime of last modification.zHeader checksum.zFile type. type is usually one of these constants: REGTYPE, AREGTYPE, LNKTYPE, SYMTYPE, DIRTYPE, FIFOTYPE, CONTTYPE, CHRTYPE, BLKTYPE, GNUTYPE_SPARSE.zcName of the target file name, which is only present in TarInfo objects of type LNKTYPE and SYMTYPE.z User name.z Group name.zDevice major number.zDevice minor number.zThe tar header starts here.zThe file's data starts here.zMA dictionary containing key-value pairs of an associated pax extended header.zSparse member information.N)rrr)r*r'r(chksumtyperr+r,devmajordevminorrr pax_headersrr_sparse_structs _link_targetrcCsj||_d|_d|_d|_d|_d|_d|_t|_d|_ d|_ d|_ d|_ d|_ d|_d|_d|_i|_dS)zXConstruct a TarInfo object. name is the optional name of the member. irrN)rrr)r*r'r(rREGTYPErrr+r,rrrrrr rrr8r8r9rs"zTarInfo.__init__cCs|jS)z(In pax headers, "name" is called "path".rrr8r8r9r%sz TarInfo.pathcCs ||_dSrr%r$r8r8r9r%scCs|jS)z0In pax headers, "linkname" is called "linkpath".rrr8r8r9r&szTarInfo.linkpathcCs ||_dSrr&)rrr8r8r9r&scCsd|jj|jt|fS)Nz<%s %r at %#x>)rrpridrr8r8r9__repr__szTarInfo.__repr__T) rr(rrr)r*r+r,r_KEEPc Cs| rt|} n t|} || ur(|| _|| ur6|| _|| urD|| _|| urR|| _|| ur`|| _|| urn|| _|| ur||| _|| ur|| _ | S)zGReturn a deep copy of self with the given attributes replaced. ) copydeepcopyrr(rrr)r*r+r,) rrr(rrr)r*r+r,rr)resultr8r8r9rs(  zTarInfo.replacecCs|jdurd}n |jd@}|j||j|j|j|j|j|j|j|j |j |j |j d }|dt kr||dds||dd7<|S)z9Return the TarInfo's attributes as a dictionary. N) rrr)r*r'r(rrrr+r,rrrrr)rrr)r*r'r(rrrr+r,rrDIRTYPEr)rrinfor8r8r9get_infos(  zTarInfo.get_infosurrogateescapecCsz|}|D]\}}|durtd|q|tkrD||||S|tkrZ||||S|tkrn|||StddS)zr)rr/r6r7rXr8r8r9r4 szTarInfo.create_gnu_headerc CsLt|d<|j}ddtfddtfddfD]h\}}}||vr>q*z||dd Wn"tyt||||<Yq*Yn0t|||kr*||||<q*d D]\}}d }||} t| t } | rt | n| } d | krd |dksnd ||<d}n| r| ||<d}|r||vrt | ||<q|r4| |t |} nd} | ||tddS)zReturn the object as a ustar header block. If it cannot be represented this way, prepend a pax extended header sequence with supplement information. r8rr%rr&)r+r+ )r,r,rCrDrE))r)rB)r*rB)r' )r(rDFrrBr#Trr)r:r r*r<r;r1UnicodeEncodeErrorr2 isinstancefloatroundstr_create_pax_generic_headerXHDTYPEr>r ) rr/r6r rZhnamer5rRZ needs_paxvalZ val_is_floatZval_intrXr8r8r9r5s>       zTarInfo.create_pax_headercCs||tdS)zAReturn the object as a pax global header block sequence. r/)rJXGLTYPE)clsr r8r8r9create_pax_global_headerTsz TarInfo.create_pax_global_headercCs~|d}tdt|D]T}d|d|}d||d}t|||tkrt|||tkrqvqtd||fS)zUSplit a name longer than 100 chars into a prefix and a name part. rr#Nzname is too long)splitrHr2rr1 LENGTH_PREFIXr<r0)rrr6r7 componentsrMr9r8r8r9r=Zs zTarInfo._posix_split_namec Cs|dttfv}|r@t|ddd|}t|ddd|}ntdd||}tdd||}|dt}|durxtdt|d dd ||t|d dd @d|t|d dd|t|ddd|t|ddd|t|ddd|d|t|ddd |||dtt|ddd||t|ddd||||t|ddd||g}t dt d |} t | t dd} | ddt d| d| dd} | S) zReturn a header block. info is a dictionary with file information, format must be one of the *_FORMAT constants. rrrrBrrNzTarInfo.type must not be Nonerrrr-r)r*r'rDr(s rr8r+rCr,r9rz%dsriz%06orDi)getCHRTYPEBLKTYPErTr:r#r0r:rVrrrrYrO) r/rSr6r7Zhas_device_fieldsrrZfiletypepartsrXrr8r8r9r>js:  &zTarInfo._create_headercCs.tt|t\}}|dkr*|t|t7}|S)zdReturn the string payload filled with zero bytes up to the next 512 byte border. r)r]r2rr3)payloadrdrer8r8r9_create_payloadszTarInfo._create_payloadcCsR|||t}i}d|d<||d<t||d<t|d<||t||||S)zTReturn a GNUTYPE_LONGNAME or GNUTYPE_LONGLINK sequence for name. z ././@LongLinkrrr'r8)r1r3r2r?r>r rX)rNrrr6r7r/r8r8r9r@s zTarInfo._create_gnu_long_headerc Cs0d}|D]6\}}z|ddWq ty@d}YqDYq 0q d}|rT|d7}|D]\}}|d}|r||d}n |d}t|t|d}d } } |tt| } | | krq| } q|tt| d d |d |d 7}q\i} d| d<|| d<t|| d<t| d<|| td d| |S)zReturn a POSIX.1-2008 extended or global header sequence that contains a list of keyword, value pairs. The values must be strings. Fr/rETrs21 hdrcharset=BINARY r1rrrD = z././@PaxHeaderrrr'r8r) r2r1rEr2rIrOr:r>r rX) rNr rr6binarykeywordr6recordslrLr>r/r8r8r9rJs<   ( z"TarInfo._create_pax_generic_headerc Cstt|dkrtdt|tkr(td|ttkr>tdt|dd}|t|vrbt d|}t |dd|||_ t|dd |_ t|d d |_ t|d d |_t|d d |_t|d d|_||_|dd |_t |d d|||_t |dd|||_t |dd|||_t|dd|_t|dd|_t |dd||}|jtkr|j drt|_|jtkr6d}g}tdD]j} z0t|||d} t||d|d} WntyYqYn0|| | f|d7}qt|d} t|dd} || | f|_ |!rN|j "d|_ |rp|jt#vrp|d|j |_ |S)zAConstruct a TarInfo object from a 512 byte bytes object. rz empty headerztruncated headerzend of file headerz bad checksumrlt|ii i)iIiQiYirirrDiii)$r2rtrrucountr3rvrNrYrKr?rrr)r*r'r(rrrr+r,rrAREGTYPErr.GNUTYPE_SPARSErHr0rboolr!rrstrip GNU_TYPES)rNrXr6r7robjr9rstructsrMrnumbytes isextendedorigsizer8r8r9frombufsZ         zTarInfo.frombufcCs8|jt}|||j|j}|jt|_||S)zOReturn the next TarInfo object from TarFile object tarfile. ) rr^rrsr6r7rr _proc_member)rNrrXrnr8r8r9 fromtarfile!s zTarInfo.fromtarfilecCsT|jttfvr||S|jtkr,||S|jtttfvrF| |S| |SdS)zYChoose the right processing method depending on the type and call it. N) rrBrA _proc_gnulongrj _proc_sparserKrMSOLARIS_XHDTYPE _proc_pax _proc_builtin)rrr8r8r9rt6s    zTarInfo._proc_membercCsR|j|_|j}|s$|jtvr4|||j7}||_| |j |j |j |S)zfProcess a builtin type or an unknown type which will be treated as a regular file. ) rrrr rSUPPORTED_TYPES_blockr'r_apply_pax_infor r6r7)rrrr8r8r9rzCs zTarInfo._proc_builtincCs|j||j}z||}Wnty<tdYn0|j|_|jt krdt ||j |j |_ n|jtkrt ||j |j |_|S)zSProcess the blocks that hold a GNU longname or longlink member. missing or bad subsequent header)rr^r|r'rur rwrrrBr?r6r7rrAr)rrrXnextr8r8r9rvTs   zTarInfo._proc_gnulongc Cs|j\}}}|`|r|jt}d}tdD]l}z0t|||d}t||d|d} WntyxYqYn0|r| r||| f|d7}q,t|d}q||_ |j |_ |j | |j |_||_ |S)z8Process a GNU sparse header plus extra headers. rrDrgi)r!rr^rrHrNr0rrkrrrr|r'r) rrrorqrrrXrrMrrpr8r8r9rwjs(       zTarInfo._proc_sparsecCs|j||j}|jtkr&|j}n |j}d}d}g}t||krh||dkrht ||}spt dzt | d}Wntyt dYn0|dkrt d||t|krt d|d|d} ||dd| } | d\} } } | r| dks|| dkr$t d||| | f| dkr^|dur^| d krZ|j}nd }||7}q<|durvd }|D]X\}} } || d d |j}|tvr|| ||j|j}n|| d d |j}|||<qzz||}Wntytd Yn0d |vr|||nFd |vr0|||n.|ddkr^|ddkr^|||||jttfvr| ||j|j|j!|_!d|vr|j"}|#s|jt$vr|||j7}||_!|S)zVProcess an extended or global header as described in POSIX.1-2008. rNrGr#rZrs hdrcharsetsBINARYr/r~GNU.sparse.mapGNU.sparse.sizezGNU.sparse.major1zGNU.sparse.minorrFr')%rr^r|r'rrMr r*r2_header_length_prefix_rematchrKrIgroupr0rri partitionrr6_decode_pax_fieldr7PAX_NAME_FIELDSrur rw_proc_gnusparse_01_proc_gnusparse_00rS_proc_gnusparse_10rKrxr}rrr r{)rrrXr rr6 raw_headersrr5Zheader_value_end_offsetZkeyword_and_valueZ raw_keywordZequalsZ raw_valuer]r6rrr8r8r9rys|                zTarInfo._proc_paxc Csg}g}|D]\}}}|dkrRz|t|WqtyNtdYq0q |dkr z|t|Wq tytdYq 0q tt|||_dS)z?Process a GNU tar extended sparse header, version 0.0. sGNU.sparse.offsetrGsGNU.sparse.numbytesN)rrIr=r0rKlistzipr)rrrZoffsetsrp_r]r6r8r8r9rs  zTarInfo._proc_gnusparse_00cCs@dd|ddD}tt|ddd|ddd|_dS)z?Process a GNU tar extended sparse header, version 0.1. cSsg|] }t|qSr8)rI).0xr8r8r9 rz.TarInfo._proc_gnusparse_01..r,Nr$r#)rPrrr)rrr rr8r8r9rszTarInfo._proc_gnusparse_01cCsd}g}|jt}|dd\}}t|}t||dkrtd|vrT||jt7}|dd\}}|t|q,|j|_t t |ddd|ddd|_ dS)z?Process a GNU tar extended sparse header, version 1.0. Nr[r#r$) rr^rrPrIr2rrrrrr)rrr rfieldsrrXnumberr8r8r9rs  zTarInfo._proc_gnusparse_10c Cs|D]\}}|dkr&t|d|q|dkr@t|dt|q|dkrZt|dt|q|tvr|tvrzt||}Wntyd}Yn0|dkr|d}t|||q||_dS) zoReplace fields with supplemental information from a previous pax extended or global header. zGNU.sparse.namer%rr'zGNU.sparse.realsizerrN) r2setattrrI PAX_FIELDSPAX_NUMBER_FIELDSr0rlr*r )rr r6r7r]r6r8r8r9r})s"   zTarInfo._apply_pax_infocCs2z||dWSty,|||YS0dS)z1Decode a single field from a pax record. rEN)r=UnicodeDecodeError)rr6r6Zfallback_encodingZfallback_errorsr8r8r9r@s zTarInfo._decode_pax_fieldcCs2|dkrtdt|t\}}|r*|d7}|tS)z_Round up a byte count by BLOCKSIZE and return it, e.g. _block(834) => 1024. rzinvalid offsetr#)rKr]r)rrhrdrer8r8r9r|Hs zTarInfo._blockcCs |jtvSz4Return True if the Tarinfo object is a regular file.)r REGULAR_TYPESrr8r8r9r Tsz TarInfo.isregcCs|Sr)r rr8r8r9isfileXszTarInfo.isfilecCs |jtkS)z!Return True if it is a directory.)rr.rr8r8r9r\sz TarInfo.isdircCs |jtkS)z%Return True if it is a symbolic link.)rSYMTYPErr8r8r9r`sz TarInfo.issymcCs |jtkS)z!Return True if it is a hard link.)rLNKTYPErr8r8r9r dsz TarInfo.islnkcCs |jtkS)z(Return True if it is a character device.)rrTrr8r8r9ischrhsz TarInfo.ischrcCs |jtkS)z$Return True if it is a block device.)rrUrr8r8r9isblklsz TarInfo.isblkcCs |jtkS)zReturn True if it is a FIFO.)rFIFOTYPErr8r8r9isfifopszTarInfo.isfifocCs |jduSr)rrr8r8r9issparsetszTarInfo.issparsecCs|jtttfvS)zCReturn True if it is one of character device, block device or FIFO.)rrTrUrrr8r8r9isdevwsz TarInfo.isdev)r)4rprqrrrsdict __slots__rpropertyr%setterr&r(r)rr0rr r7r3r4r5 classmethodrOr= staticmethodr>rXr@rJrsrurtrzrvrwryrrrr}rr|r rrrr rrrrrr8r8r8r9rfs       :  )   2 >  y rc @seZdZdZdZdZdZdZeZ e Z dZ e ZeZdZdkdd Zedddefd d Zedld d ZedmddZednddZedoddZdddddZddZddZddZd d!Zdpd"d#Zdqdd%d&d'Z drdd(d)d*Z!dsd+d,Z"d-d.Z#dtddd0d1d2Z$d3d4Z%duddd0d6d7Z&d8d9Z'dvd:d;Z(dd?Z*d@dAZ+dwdddBdCdDZ,dEdFZ-dGdHZ.dIdJZ/dKdLZ0dMdNZ1dOdPZ2dQdRZ3dSdTZ4dUdVZ5dWdXZ6dYdZZ7dxd[d\Z8d]d^Z9dyd_d`Z:dadbZ;dcddZdidjZ?dS)zrz=The TarFile Class provides an interface to tar archives. rFr#Nrzr1c Csddddd}||vrtd||_|||_|sh|jdkrTtj|sTd|_d|_t||j}d |_n@|d urt|d rt |j t t fr|j }t|d r|j|_d |_|rtj |nd |_ ||_|d ur||_|d ur||_|d ur||_|d ur||_|d ur ||_| |_| d ur0|jtkr0| |_ni|_| d urF| |_| d urV| |_| |_d |_g|_d |_|j|_i|_z|jdkrd |_ |!|_ |jdkr2|j"|jz|j#|}|j$|WnXt%y|j"|jYq2Yn2t&y,}zt't |WYd }~n d }~00q|jdvr|d |_|jr||j(|j)}|j*||jt+|7_Wn&|js|j,d |_Yn0d S)aOpen an (uncompressed) tar archive `name'. `mode' is either 'r' to read from an existing archive, 'a' to append data to an existing file or 'w' to create a new file overwriting an existing one. `mode' defaults to 'r'. If `fileobj' is given, it is used for reading or writing data. If it can be determined, `mode' is overridden by `fileobj's mode. `fileobj' is not closed, when TarFile is closed. rbzr+bwbxbrzar{r!mode must be 'r', 'a', 'w' or 'x'rr{FNrrTrzrr{r)-r0r_moder}r%exists bltn_openrrrFrrIrOabspathrrSr dereference ignore_zerosr6r7rr debug errorlevel copybufsizermembers_loadedrrinodes firstmemberrrrurrvr rrOr*r_r2r)rrrrrSrrrr6r7r rrrZmodeserXr8r8r9rs             &   zTarFile.__init__c s|s|std|dvrfdd}tj|dD]l}tj|}|durV|} z||d|fi|WSttfy|dur|| Yq2Yq20q2tdnd |vr|d d \} }| pd} |pd }|jvrtj|}n td |||| |fi|Sd |vr|d d \} }| p4d} |p>d }| dvrRtdt || |||} z|| | fi|} Wn| Yn0d| _ | S|dvrj |||fi|StddS)aOpen a tar archive for reading, writing or appending. Return an appropriate TarFile class. mode: 'r' or 'r:*' open for reading with transparent compression 'r:' open for reading exclusively uncompressed 'r:gz' open for reading with gzip compression 'r:bz2' open for reading with bzip2 compression 'r:xz' open for reading with lzma compression 'a' or 'a:' open for appending, creating the file if necessary 'w' or 'w:' open for writing without compression 'w:gz' open for writing with gzip compression 'w:bz2' open for writing with bzip2 compression 'w:xz' open for writing with lzma compression 'x' or 'x:' create a tarfile exclusively without compression, raise an exception if the file is already created 'x:gz' create a gzip compressed tarfile, raise an exception if the file is already created 'x:bz2' create a bzip2 compressed tarfile, raise an exception if the file is already created 'x:xz' create an lzma compressed tarfile, raise an exception if the file is already created 'r|*' open a stream of tar blocks with transparent compression 'r|' open an uncompressed stream of tar blocks for reading 'r|gz' open a gzip compressed stream of tar blocks 'r|bz2' open a bzip2 compressed stream of tar blocks 'r|xz' open an lzma compressed stream of tar blocks 'w|' open an uncompressed stream for writing 'w|gz' open a gzip compressed stream for writing 'w|bz2' open a bzip2 compressed stream for writing 'w|xz' open an lzma compressed stream for writing znothing to open)rzr:*csj|dkS)Ntaropen) OPEN_METH)rrNr8r9not_compressed1sz$TarFile.open..not_compressed)keyNrzz%file could not be opened successfully:r#rr|ryzmode must be 'r' or 'w'Frzundiscernible mode) r0sortedrrjrrrrrPrrrr) rNrrrrckwargsrrfuncZ saved_posfilemodestreamrr8rr9rsP%            z TarFile.opencKs$|dvrtd||||fi|S)zCOpen uncompressed tar archive name for reading or writing. rr)r0)rNrrrrr8r8r9rbszTarFile.taropenrcKs|dvrtdzddlm}Wnty:tdYn0z|||d||}Wn,ty~|durx|dkrxtd Yn0z|j|||fi|}Wn@ty||dkrtd Yn|Yn0d |_ |S) zkOpen gzip compressed tar archive name for reading or writing. Appending is not allowed. rzr{rmode must be 'r', 'w' or 'x'r)GzipFilezgzip module is not availablerfNrzrF) r0gziprrrrrrrr)rNrrr compresslevelrrrr8r8r9gzopenjs0   zTarFile.gzopenc Ks|dvrtdzddlm}Wnty:tdYn0||pD|||d}z|j|||fi|}WnDttfy||dkrt dYn|Yn0d |_ |S) zlOpen bzip2 compressed tar archive name for reading or writing. Appending is not allowed. rrr)BZ2Filer)rrzznot a bzip2 fileF) r0rrrrrrEOFErrorrrr)rNrrrrrrrr8r8r9bz2opens& zTarFile.bz2openc Ks|dvrtdzddlm}m}Wnty>tdYn0||pH|||d}z|j|||fi|}WnD|tfy||dkrt dYn|Yn0d |_ |S) zkOpen lzma compressed tar archive name for reading or writing. Appending is not allowed. rrr)LZMAFilerr)presetrzznot an lzma fileF) r0rrrrrrrrrr) rNrrrrrrrrr8r8r9xzopens& zTarFile.xzopenrrrr)rrrrcCs|jr dSd|_zp|jdvrn|jttd|jtd7_t|jt\}}|dkrn|jtt|W|j s|j n|j s|j 0dS)zlClose the TarFile. In write-mode, two finishing zero blocks are appended to the archive. NTrr$r) rrrr_r3rrr] RECORDSIZErr)rrdrer8r8r9rs  z TarFile.closecCs(||d}|dur$td||S)aReturn a TarInfo object for member `name'. If `name' can not be found in the archive, KeyError is raised. If a member occurs more than once in the archive, its last occurrence is assumed to be the most up-to-date version. rNzfilename %r not found) _getmemberrlKeyError)rrrr8r8r9 getmembers zTarFile.getmembercCs||js||jS)zReturn the members of the archive as a list of TarInfo objects. The list has the same order as the members in the archive. )_checkr_loadrrr8r8r9 getmembersszTarFile.getmemberscCsdd|DS)zReturn the members of the archive as a list of their names. It has the same order as the list returned by getmembers(). cSsg|] }|jqSr8r%)rrr8r8r9rrz$TarFile.getnames..)rrr8r8r9getnamesszTarFile.getnamesc CsZ|d|dur|j}|dur$|}tj|\}}|tjd}|d}|}||_ |dur|j stt |}qt |}nt |}d}|j}t |r|j|jf} |j s|jdkr| |jvr||j| krt} |j| }nt} | dr||j| <nht |rt} nVt |r"t} nDt |r>t} t|}n(t |rPt} nt |rbt!} ndS||_||_"|j#|_$|j%|_&| tkr|j'|_(nd|_(|j)|_*| |_+||_,t-rzt-.|j$d|_/Wnt0yYn0t1rzt12|j&d|_3Wnt0yYn0| tt!fvrVt4tdrVt4tdrVt5|j6|_7t8|j6|_9|S) aCreate a TarInfo object from the result of os.stat or equivalent on an existing file. The file is either named by `name', or specified as a file object `fileobj' with a file descriptor. If given, `arcname' specifies an alternative name for the file in the archive, otherwise, the name is taken from the 'name' attribute of 'fileobj', or the 'name' argument. The name should be a text string. awxNrrr#rmajorminor):rrr}r% splitdriverrr rrrlstatstatfstatfilenost_modeS_ISREGst_inost_devst_nlinkrrr#S_ISDIRr.S_ISFIFOrS_ISLNKrreadlinkS_ISCHRrTS_ISBLKrUrst_uidr)st_gidr*st_sizer'st_mtimer(rrpwdgetpwuidr+rgrpgetgrgidr,rrst_rdevrrr) rrarcnamerdrvrZstatresrZstmdinoderr8r8r9 gettarinfos                 zTarFile.gettarinfoT)rcCs*||dur|}|D] }|r|jdur6tdntt|jtd|jpT|j|jp^|jf| sv| rtdd|j |j fntd|j |jdurtdntdt|jdd t|j|rd nd |r|rtd |j|rtd |jtqdS)aPrint a table of contents to sys.stdout. If `verbose' is False, only the names of the members are printed. If it is True, an `ls -l'-like output is produced. `members' is optional and must be a subset of the list returned by getmembers(). Nz ??????????z%s/%sz%10sz%d,%dz%10dz????-??-?? ??:??:??z%d-%02d-%02d %02d:%02d:%02drrrz-> zlink to )rrrnrrr+r)r,r*rrrrr'r(r localtimerrrrr rm)rverboserrr8r8r9ras8        z TarFile.listfiltercCsL|d|dur|}|jdurFtj||jkrF|dd|dS|d||||}|durz|dd|dS|dur||}|dur|dd|dS|rt|d}| ||Wdn1s0Ynb| r>| ||rHt t |D],}|j tj||tj||||d qn | |dS) a!Add the file `name' to the archive. `name' may be any type of file (directory, fifo, symbolic link, etc.). If given, `arcname' specifies an alternative name for the file in the archive. Directories are added recursively by default. This can be avoided by setting `recursive' to False. `filter' is a function that expects a TarInfo object argument and returns the changed TarInfo object, if it returns None the TarInfo object will be excluded from the archive. rNr$ztarfile: Skipped %rr#ztarfile: Unsupported type %rtarfile: Excluded %rrr)rrr}r%r_dbgrr raddfilerrlistdiraddr)rrr recursiverrfr8r8r9r s6    ,   z TarFile.addcCs|dt|}||j|j|j}|j||jt |7_|j }|durt ||j|j |dt |j t\}}|dkr|jtt||d7}|j|t7_|j|dS)aAdd the TarInfo object `tarinfo' to the archive. If `fileobj' is given, it should be a binary file, and tarinfo.size bytes are read from it and added to the archive. You can create TarInfo objects directly, or by using gettarinfo(). rN)rcrr#)rr*r7rSr6r7rr_rr2rr\r'r]rr3rr)rrrrXrcrdrer8r8r9r s   zTarFile.addfilecCsT|dur|j}|durtjd}|durz tt}WntyJYnV0ddl}|jddd}|| |Wdn1s0Y|jdddd}|rz t |}Wn$t yt d|d dYn0||_|St rtd ttStSt|tr td |St|r|Sz t |WSt yNt d|d dYn0dS) NZ PYTHON_TARFILE_EXTRACTION_FILTERr)#)Z interpolationZcomment_prefixesrr)fallbackzfilter z not foundaThe default behavior of tarfile extraction has been changed to disallow common exploits (including CVE-2007-4559). By default, absolute/parent paths are disallowed and some mode bits are cleared. See https://access.redhat.com/articles/7004769 for more details.zrString names are not supported for TarFile.extraction_filter. Use a function such as tarfile.data_filter directly.)extraction_filterr}environrSr_CONFIG_FILENAMEFileNotFoundError configparser ConfigParserZ read_file_NAMED_FILTERSrr0_RH_SAFER_DEFAULTwarningswarnRuntimeWarningrrrFrI TypeErrorcallable)rrrfilerZconfr8r8r9_get_filter_functionsZ    (      zTarFile._get_filter_function.) numeric_ownerrc Csg}||}|dur|}|D]L}||||\}} |dur>q|rP|| |j||| ||dq|jdddd|D]0} zz|| |}WnBty} z*|| t| WYd} ~ WqWYd} ~ n d} ~ 00|dur|| dWqt j ||j } zt | } Wn&ty8||dYWqYn0t| jsX||d Wq|j|| |d ||| ||| Wqty} z|| WYd} ~ qd} ~ 00qdS) aExtract all members from the archive to the current working directory and set owner, modification time and permissions on directories afterwards. `path' specifies a different directory to extract to. `members' is optional and must be a subset of the list returned by getmembers(). If `numeric_owner` is True, only the numbers for user/group names are used and not the names. The `filter` function will be called on each member just before extraction. It can return a changed TarInfo or None to skip the member. String names of common filters are accepted. N) set_attrsr filter_functioncSs|jSrr%)rr8r8r9+ rz$TarFile.extractall..T)rreversezexcluded by filtermissingznot a directory)r )r_get_extract_tarinforr _extract_onesort_FILTER_ERRORS_log_no_directory_fixupreprr}r%rrrrrrrchownutimechmodr _handle_nonfatal_error)rr%rr rZ directoriesr"rr unfilteredexcdirpathrrr8r8r9 extractall sV   $    zTarFile.extractallcCs|dd|j|fdS)Nr$z(tarfile: Not fixing up directory %r (%s))rr)rrreasonr8r8r9r*M szTarFile._log_no_directory_fixuprc Cs8||}||||\}}|dur4|||||dS)aExtract a member from the archive to the current working directory, using its full name. Its file information is extracted as accurately as possible. `member' may be a filename or a TarInfo object. You can specify a different directory using `path'. File attributes (owner, mtime, mode) are set unless `set_attrs' is False. If `numeric_owner` is True, only the numbers for user/group names are used and not the names. The `filter` function will be called before extraction. It can return a changed TarInfo or None to skip the member. String names of common filters are accepted. N)rr&r') rrr%r!r rr"rr0r8r8r9extractQ s  zTarFile.extractc Cst|tr||}n|}d}z|||}Wn^ttfy^}z||WYd}~n6d}~0ty}z||WYd}~n d}~00|dur|dd|j dS| rt |}t j ||j|_||fS)zGet (filtered, unfiltered) TarInfos from *member* *member* might be a string. Return (None, None) if not found. Nr$r)NN)rFrIrrr_handle_fatal_errorr r/rrr r*r}r%rrr")rrr"r%r0filteredrr8r8r9r&e s"    zTarFile._get_extract_tarinfoc Cs|dz&|j|tj||j||||dWnZty^}z||WYd}~n6d}~0ty}z| |WYd}~n d}~00dS)zExtract from filtered tarinfo to disk. filter_function is only used when extracting a *different* member (e.g. as fallback to creating a symlink) rz)r!r r"extraction_rootN) r_extract_memberr}r%rrrr6r r/)rrr%r!r r"rr8r8r9r' s  zTarFile._extract_onecCs"|jdkrn|dd|dS)z=Handle non-fatal error (ExtractError) according to errorlevelr# tarfile: %sN)rrrrr8r8r9r/ s zTarFile._handle_nonfatal_errorcCsn|jdkrn\t|trP|jdur6|dd|jqj|dd|j|jfn|ddt|j|fdS)z1Handle "fatal" error according to self.errorlevelrNr#r:ztarfile: %s %rztarfile: %s %s)rrFrfilenamerstrerrorrrpr;r8r8r9r6 s   zTarFile._handle_fatal_errorcCs|dt|tr ||}n|}|s6|jtvrB|||S|sR| rzt|j t rht dq~| ||SndSdS)a\Extract a member from the archive as a file object. `member' may be a filename or a TarInfo object. If `member' is a regular file or a link, an io.BufferedReader object is returned. For all other existing members, None is returned. If `member' does not appear in the archive, KeyError is raised. rzz'cannot extract (sym)link as file objectN)rrFrIrr rr{ fileobjectr rrrr extractfile_find_link_target)rrrr8r8r9r? s      zTarFile.extractfiler"r8cCsZ|d}|dtj}tj|}|r>tj|s>t||sN| rh| dd|j |j fn| d|j | r|||n|r|||n~|r|||nh|s|r|||nJ|s| r|j||||dn&|jtvr|||n ||||rV||||| sV||||||dS)zExtract the filtered TarInfo object tarinfo to a physical file called targetpath. filter_function is only used when extracting a *different* member (e.g. as fallback to creating a symlink) rr#z%s -> %srAN)rlrr}rr%rrmakedirsr rrrrr makefilermakedirrmakefiforrmakedevmakelink_with_filterrr{ makeunknownr,r.r-)rr targetpathr!r r"r8Z upperdirsr8r8r9r9 s<       zTarFile._extract_membercCs>z&|jdurt|n t|dWnty8Yn0dS)z,Make a directory called targetpath. Ni)rr}mkdirFileExistsErrorrrrIr8r8r9rD s    zTarFile.makedircCs|j}||j|j}t|dl}|jdurn|jD]"\}}||t|||t|q4||j| nt|||jt|Wdn1s0YdS)z'Make a file called targetpath. rN) rrrrrrr\rr'truncate)rrrIsourcerctargetrr'r8r8r9rC s      zTarFile.makefilecCs"||||dd|jdS)zYMake a file from a TarInfo object with an unknown type at targetpath. r#z9tarfile: Unknown file type %r, extracted as regular file.N)rCrrrLr8r8r9rH s zTarFile.makeunknowncCs"ttdrt|ntddS)z'Make a fifo called targetpath. mkfifozfifo not supported by systemN)rr}rPr rLr8r8r9rE( s  zTarFile.makefifocCsjttdrttdstd|j}|dur.d}|rB|tjO}n |tjO}t||t |j |j dS)zd}zX|r8tj|r$t|t|j|WdStj|jrZt |j|WdSWnt yrd}Yn0z| |}Wn"t y|rt dnYn0|dur|}nj|durt dz$||j|jdd||||}Wn4ty}zt||j|WYd}~n d}~00|dur:|j||||ddS)a3Make a (symbolic) link called targetpath. If it cannot be created (platform limitation), we try to make a copy of the referenced file instead of a link. filter_function is only used when extracting a *different* member (e.g. as fallback to creating a link). FNTz%unable to resolve link inside archivez[makelink_with_filter: if filter_function is not None, extraction_root must also not be None)rrrA)rr}r%lexistsunlinksymlinkrrr"linksymlink_exceptionr@rr rrr)rr9) rrrIr"r8Zkeyerror_to_extracterrorr0r7causer8r8r9rGE sN       $ zTarFile.makelink_with_filtercCsttdrtdkr|j}|j}|sztrB|jrBt|jd}WntyVYn0zt rt|j rtt |j d}WntyYn0|durd}|durd}z4| rttdrt |||nt|||WntytdYn0dS)zSet owner of targetpath according to tarinfo. If numeric_owner is True, use .gid/.uid instead of .gname/.uname. If numeric_owner is False, fall back to .gid/.uid when the search based on name fails. geteuidrr$Nr;lchownzcould not change owner)rr}r[r*r)rr,getgrnamrrr+getpwnamrr\r,rr )rrrIr gur8r8r9r,z s0     z TarFile.chowncCs@|jdurdSzt||jWnty:tdYn0dS)zASet file permissions of targetpath according to tarinfo. Nzcould not change mode)rr}r.rr rLr8r8r9r. s   z TarFile.chmodcCsT|j}|durdSttds dSzt|||fWntyNtdYn0dS)zBSet modification time of targetpath according to tarinfo. Nr-z"could not change modification time)r(rr}r-rr )rrrIr(r8r8r9r- s  z TarFile.utimec Csl|d|jdur$|j}d|_|S|j|jkrZ|j|jd|jdsZtdd}z|j |}WqJt y}zD|j r| dd|j|f|jt 7_WYd}~q^WYd}~qJd}~0tyD}z`|j r| dd|j|f|jt 7_WYd}~q^n|jdkr.tt|WYd}~qJd}~0tyj|jdkrftdYnty}z$|jdkrtt|WYd}~nd}~0ty}ztt|WYd}~nvd}~0tyB}zTz.ddl}t||jrtd |n|Wnty,|Yn0WYd}~n d}~00qJq^|durb|j|nd |_|S) zReturn the next member of the archive as a TarInfo object, when TarFile is opened for reading. Return None if there is no more available. ZraNr#rZr$z0x%X: %srz empty filez zlib error: T)rrrrrrr^rrrurvrrrrKrIrtrurw ExceptionrrFrrrrr)rmrrrr8r8r9r sZ   " "       z TarFile.nextc Cs|}d}|durFz||}Wnty8d}Yn0|d|}|rVtj|}t|D]D}|rx|j|jkr^d}q^|rtj|j}n|j}||kr^|Sq^|rt|dS)z}Find an archive member by name from bottom to top. If tarinfo is given, it is used as the starting point. FNT) rindexr0r}r%rreversedrr) rrr normalizerZskippingrcr member_namer8r8r9r s,       zTarFile._getmembercCs|}|durqqd|_dS)zWRead through the entire archive file and look for readable members. NT)rrrr8r8r9r sz TarFile._loadcCs:|jrtd|jj|dur6|j|vr6td|jdS)znCheck if TarFile is still open, and if the operation's mode corresponds to TarFile's mode. z %s is closedNzbad operation for mode %r)rrrrpr)rrr8r8r9r$ szTarFile._checkcCs`|r.dtdtj|j|jf}d}n |j}|}|j||dd}|dur\t d||S)zZFind the target member of a symlink or hardlink member in the archive. rNT)rrezlinkname %r not found) rrrr}r%rrrrr)rrrlimitrr8r8r9r@- s  zTarFile._find_link_targetccs|jr|jEdHdSd}|jdur:|}|d7}|V|t|jkrT|j|}n"|jsr|}|svd|_dSndS|d7}|Vq:dS)z$Provide an iterator object. Nrr#T)rrrrr2)rrcrr8r8r9__iter__@ s$   zTarFile.__iter__cCs||jkrt|tjddS)z.Write debugging output to sys.stderr. rN)rrmrkstderr)rlevelmsgr8r8r9r_ s z TarFile._dbgcCs ||Sr)rrr8r8r9 __enter__e szTarFile.__enter__cCs,|dur|n|js"|jd|_dSr)rrrr)rrr6 tracebackr8r8r9__exit__i s   zTarFile.__exit__) NrzNNNNNNr1NNNN)rzN)rzNr)rzNr)rzNN)NNN)T)NT)N)rN)rT)N)TF)NF)N)@rprqrrrsrrrrrrSr r6r7rrrr>rrrrrrrrrrrrrrrrr r rr3r*r5r&r'r/r6r?r9rDrCrHrErFrTrGr,r.r-rrrrr@rhrrmror8r8r8r9r|s oZ        c&3 5 E     85! ? ( rcCsFz,t|drt|d}nt|}|WdSty@YdS0dS)zReturn True if name points to a tar archive that we are able to handle, else return False. 'name' should be a string, file, or file-like object. r^)rTFN)rrrr)rrr8r8r9rw s   rc Cs`ddl}d}|j|d}|jdddddd |jd d td d |jdd}|jddddd|jdddddd|jdddddd|jdd dd!d|}|jr|jdur|d"d#|j durJ|j }t |r4t |d$*}| t | tjd%Wdn1s0Y|jrFt d&|n|d"d'|n|jdur|j}t |rt |d(}|j|jd)Wdn1s0Yn|d"d'|n|jdurt|jd"kr|jd}tj}n,t|jd*kr|j\}}n|d"|t |rt |d( }|j||jd+Wdn1sR0Y|jr|d,krzd-|} n d.||} t | n|d"d'|n|jdur\|jd} tj| \} } d/d/d0d0d1d1d1d1d2} | | vrd3| | nd4}|j}t | |&}|D]}||qWdn1s<0Y|jr\t d5| dS)6Nrz3A simple command-line interface for tarfile module.) descriptionz-vz --verbose store_trueFzVerbose output)actiondefaulthelpz--filterz zFilter for extraction)metavarchoicesrtT)requiredz-lz--list zShow listing of a tarfile)rurtz-ez --extract+)rxz zExtract tarfile into target dir)nargsrurtz-cz--create)zzzCreate tarfile from sourcesz-tz--testzTest if a tarfile is validr#z&--filter is only valid for extraction rzriz{!r} is a tar archive.z{!r} is not a tar archive. r)rr$)r%rrz{!r} file is extracted.z+{!r} file is extracted into {!r} directory.rrr)rz.tgzz.xzz.txzz.bz2z.tbzz.tbz2z.tb2zw:r{z{!r} file created.)argparseArgumentParser add_argumentradd_mutually_exclusive_group parse_argsrr5exittestrrrrmrkrjrrSrrr2r}curdir format_helpr3Zcreatepopr%splitextr )r{rpparserrargsr`rZtfrrlZtar_namerextZ compressionsZtar_modeZ tar_files file_namer8r8r9main s           2  0    0      .r__main__)T)qrsversion __author__ __credits__builtinsrrrkr}rr[rrrVr*rerrrrAttributeErrorNotImplementedErrorrYr NameError__all__rrr3rrr?r:r<r;rQr#rirrrTrUr.rZCONTTYPErBrArjrKrMrxr rrrr{rrmrrrGrIrrr getfilesystemencodingr:r?rNrTrYr\rnrarr rrr r rtrurvrKrwrxrobjectrrBufferedReaderrrrrrrrrr)rrrrrr)compilerrrrrrpr8r8r8r9s$          sh   D  _