Skip to content

Commit

Permalink
moved KeyboardInterrupt before BaseException
Browse files Browse the repository at this point in the history
just for the only try-except block that needs it.
  • Loading branch information
purovida94 committed Feb 28, 2023
1 parent 1bbf05e commit f85d2ba
Show file tree
Hide file tree
Showing 4 changed files with 1,251 additions and 2 deletions.
Binary file added PyHa/.IsoAutio.py.swp
Binary file not shown.
Binary file added PyHa/.IsoAutio.py.un~
Binary file not shown.
4 changes: 2 additions & 2 deletions PyHa/IsoAutio.py
Original file line number Diff line number Diff line change
Expand Up @@ -932,11 +932,11 @@ def generate_automated_labels_microfaune(
try:
SIGNAL, SAMPLE_RATE = librosa.load(audio_dir + audio_file, sr=None, mono=True)
SIGNAL = SIGNAL * 32768
except KeyboardInterrupt:
sys.exit("Keyboard interrupt")
except BaseException:
checkVerbose("Failed to load" + audio_file, isolation_parameters)
continue
except KeyboardInterrupt:
sys.exit("Keyboard interrupt")

# downsample the audio if the sample rate isn't 44.1 kHz
# Force everything into the human hearing range.
Expand Down
Loading

0 comments on commit f85d2ba

Please sign in to comment.