Skip to content

Commit

Permalink
fix: don't save SoundSwallower logs on Windows, it's buggy
Browse files Browse the repository at this point in the history
On Windows, you cannot delete a file if you still have a filehandle open
on it, and soundswallower does not close its file handle on ss_log
passed via cfg.set_string("-logfn", ss_log). Not the best solution, but
we just don't save those log files when we're on Windows. Use
--debug-aligner on that platform to see them.
  • Loading branch information
joanise committed Feb 4, 2022
1 parent fb65c8c commit ed3e4a8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion readalongs/align.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import io
import os
import shutil
import sys
from collections import defaultdict
from dataclasses import dataclass
from datetime import timedelta
Expand Down Expand Up @@ -225,8 +226,9 @@ def align_audio( # noqa: C901
if not debug_aligner:
# With --debug-aligner, we display the SoundSwallower logs on screen, but
# otherwise we redirect them away from the terminal.
if save_temps:
if save_temps and (sys.platform not in ("win32", "cygwin")):
# With --save-temps, we save the SoundSwallower logs to a file.
# This is buggy on Windows, so we don't do it on Windows variants
ss_log = save_temps + ".soundswallower.log"
else:
# Otherwise, we send the SoundSwallower logs to the bit bucket.
Expand Down

0 comments on commit ed3e4a8

Please sign in to comment.