Skip to content

Commit

Permalink
Don't log as word when chord not on device
Browse files Browse the repository at this point in the history
Fixes #83
  • Loading branch information
Raymo111 committed Nov 3, 2023
1 parent cfe015c commit 82933e5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/nexus/Freqlog/Freqlog.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ def _log_chord(self, chord: str, start_time: datetime, end_time: datetime) -> No
if not self.chords:
logging.warning("Chords not loaded, not logging chord")
elif chord not in self.chords: # TODO: handle chord modifications (i.e. tense, plural, case)
# Actually a word, not a chord?
logging.warning(f"Chord '{chord}' not found in device chords, treating as word")
self._log_word(chord, start_time, end_time)
logging.warning(f"Chord '{chord}' not found in device chords, timing: {start_time} - {end_time}")
elif self.backend.log_chord(chord, end_time):
logging.info(f"Chord: {chord} - {end_time}")
else:
Expand Down

0 comments on commit 82933e5

Please sign in to comment.