aboutsummaryrefslogtreecommitdiffstats
path: root/apps/osmocom_fft
diff options
context:
space:
mode:
authorDimitri Stolnikov <horiz0n@gmx.net>2013-06-05 19:38:57 +0200
committerDimitri Stolnikov <horiz0n@gmx.net>2013-06-05 19:52:41 +0200
commit86b906a0190f25412f66530a7afa325971f2dfe4 (patch)
treef2de2687f04aeb8131a6273e9def944d2870c5d8 /apps/osmocom_fft
parent7a129238b71771ff0b1f0b24d5de37df7aeccfdd (diff)
apps: check for sample rate availability
Diffstat (limited to 'apps/osmocom_fft')
-rwxr-xr-xapps/osmocom_fft6
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/osmocom_fft b/apps/osmocom_fft
index a346b2a..c087f6e 100755
--- a/apps/osmocom_fft
+++ b/apps/osmocom_fft
@@ -97,6 +97,12 @@ class app_top_block(stdgui2.std_top_block, pubsub):
self.src = osmosdr.source(options.args)
+ try:
+ self.src.get_sample_rates().start()
+ except RuntimeError:
+ print "Source has no sample rates (wrong device arguments?)."
+ sys.exit(1)
+
# Set the antenna
if(options.antenna):
self.src.set_antenna(options.antenna)