Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
segasai committed Dec 27, 2023
1 parent cb255d1 commit 11c7372
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions py/minimint/mist_interpolator.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,20 +173,18 @@ def writer(url, pref):
fd.close()
if os.name == 'nt':
fname_out1 = fname_out.replace('.txz', '.tar')
cmd = (
f'cd {pref} && '
f'7z x {fname_out} -so > {fname_out1} && '
# f'tar -xvf {fname_out1}'
f'7z -bb3 x {fname_out1}')
cmd = (f'cd {pref} && '
f'7z x {fname_out} && '
f'7z -bb3 x {fname_out1}')
else:
cmd = f'cd {pref}; tar xfJ {fname_out}'
ret = subprocess.run(cmd, capture_output=True, shell=True, timeout=60)
fname_out2 = fname_out1.replace('.tar', '')
aa = glob.glob(os.path.join(pref, fname_out2, '*'))
print((aa))
assert len(aa) > 0
print(cmd, fname_out, fname_out1,
ret.stdout.decode() + ret.stderr.decode())
print((aa))
assert len(aa) > 0
# ret = subprocess.run(cmd, shell=True, timeout=60)
if ret.returncode != 0:
raise RuntimeError('Failed to untar the files' +
Expand Down

0 comments on commit 11c7372

Please sign in to comment.