Skip to content

Commit

Permalink
geometry mapper restore logfile writing
Browse files Browse the repository at this point in the history
  • Loading branch information
marinagmoreira committed Jun 6, 2024
1 parent 7d493b5 commit 3ed051a
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions dense_map/geometry_mapper/tools/geometry_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,14 +479,13 @@ def run_cmd(cmd, log_file, verbose=False):

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

# for line in iter(process.stdout.readline, ''):
# if verbose:
# sys.stdout.write(line)
# f.write(line.encode())
for line in iter(process.stdout.readline, b""):
if verbose:
sys.stdout.write(line.decode())
f.write(line)

# process.stdout.close()
# If a certain step failed, do not continue
process.wait()

Expand Down

0 comments on commit 3ed051a

Please sign in to comment.