Skip to content

Commit 3ed051a

Browse files
geometry mapper restore logfile writing
1 parent 7d493b5 commit 3ed051a

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

dense_map/geometry_mapper/tools/geometry_mapper.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -479,14 +479,13 @@ def run_cmd(cmd, log_file, verbose=False):
479479

480480
with open(log_file, "wb", buffering=0) as f:
481481
f.write((cmd_str + "\n").encode())
482-
process = subprocess.Popen(cmd, stderr=subprocess.STDOUT, text=True)
482+
process = subprocess.Popen(cmd, stdout=subprocess.PIPE)
483483

484-
# for line in iter(process.stdout.readline, ''):
485-
# if verbose:
486-
# sys.stdout.write(line)
487-
# f.write(line.encode())
484+
for line in iter(process.stdout.readline, b""):
485+
if verbose:
486+
sys.stdout.write(line.decode())
487+
f.write(line)
488488

489-
# process.stdout.close()
490489
# If a certain step failed, do not continue
491490
process.wait()
492491

0 commit comments

Comments
 (0)