// remove tar file
if deleteTar:
s = ("cd "%s"" % path) + "" + "rm "%s"" % (path + fname)
if os.system(s) != 0:
raise RuntimeError("failed: " + s)
def _get_confirm_token(response):
for key, value in response.cookies.items():
if key.startswith("download_warning"):
return value
After Change
fullpath = os.path.join(path, fname)
shutil.unpack_archive(fullpath, path)
if deleteTar:
os.remove(fullpath)
def _get_confirm_token(response):
for key, value in response.cookies.items():
if key.startswith("download_warning"):