summaryrefslogtreecommitdiff
path: root/gr-audio/examples/python/dial_tone.py
diff options
context:
space:
mode:
Diffstat (limited to 'gr-audio/examples/python/dial_tone.py')
-rwxr-xr-xgr-audio/examples/python/dial_tone.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/gr-audio/examples/python/dial_tone.py b/gr-audio/examples/python/dial_tone.py
index 9c8e8d460d..c55d0d38dd 100755
--- a/gr-audio/examples/python/dial_tone.py
+++ b/gr-audio/examples/python/dial_tone.py
@@ -22,10 +22,15 @@
from gnuradio import gr
from gnuradio import audio
-from gnuradio import analog
from gnuradio.eng_option import eng_option
from optparse import OptionParser
+try:
+ from gnuradio import analog
+except ImportError:
+ sys.stderr.write("Error: Program requires gr-analog.\n")
+ sys.exit(1)
+
class my_top_block(gr.top_block):
def __init__(self):