Skip to content

Commit 44176e0

Browse files
committed
set audioio available var earlier. use consistent name for waveform available variable
1 parent 942a31a commit 44176e0

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

adafruit_rtttl.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,18 @@
1919
import pwmio
2020

2121
AUDIOIO_AVAILABLE = False
22-
HAVE_WAVEFORM_LIBRARY = False
22+
WAVEFORM_AVAILABLE = False
2323
try:
2424
import audioio
25-
from adafruit_waveform import sine
26-
27-
HAVE_WAVEFORM_LIBRARY = True
28-
2925
AUDIOIO_AVAILABLE = True
26+
from adafruit_waveform import sine
27+
WAVEFORM_AVAILABLE = True
3028
try:
3129
import audiocore
3230
except ImportError:
3331
audiocore = audioio
3432
except ImportError as e:
35-
if not HAVE_WAVEFORM_LIBRARY:
33+
if not WAVEFORM_AVAILABLE:
3634
raise e
3735

3836
try:

0 commit comments

Comments
 (0)