summaryrefslogtreecommitdiff
path: root/grc/scripts/gnuradio-companion
diff options
context:
space:
mode:
authorTom Rondeau <trondeau@vt.edu>2013-01-15 15:00:24 -0500
committerTom Rondeau <trondeau@vt.edu>2013-01-15 15:00:24 -0500
commit5be31c3d79015beeabdd98ebf1c0152ae6caac8c (patch)
treee1d678b4b3dbb5b45c8ca43dfbd5d88451da66c4 /grc/scripts/gnuradio-companion
parent0c0473d51e2c4a4275a88db562791561288e8c15 (diff)
parente1e632469905f8c4b5f0d35c988744c77cf6a227 (diff)
Merge branch 'master' into next
Conflicts: gr-digital/examples/demod/ber_simulation.grc gr-digital/examples/demod/digital_freq_lock.grc gr-digital/examples/demod/pam_sync.grc gr-digital/examples/demod/pam_timing.grc
Diffstat (limited to 'grc/scripts/gnuradio-companion')
-rwxr-xr-xgrc/scripts/gnuradio-companion11
1 files changed, 10 insertions, 1 deletions
diff --git a/grc/scripts/gnuradio-companion b/grc/scripts/gnuradio-companion
index e76322b4d8..dabca3028f 100755
--- a/grc/scripts/gnuradio-companion
+++ b/grc/scripts/gnuradio-companion
@@ -39,10 +39,19 @@ Is the library path environment variable set correctly?
d.run()
exit(-1)
-from gnuradio import gr
from optparse import OptionParser
+import os
if __name__ == "__main__":
+ if ('GR_DONT_LOAD_PREFS' in os.environ.keys() and
+ (not 'GRC_BLOCKS_PATH' in os.environ.keys() or len(os.environ['GRC_BLOCKS_PATH']) == 0)):
+ d = gtk.MessageDialog(
+ type=gtk.MESSAGE_ERROR,
+ buttons=gtk.BUTTONS_CLOSE,
+ message_format="""Can't find block definitions. Use config.conf or GRC_BLOCKS_PATH. """)
+ d.set_title("No block definitions available.")
+ d.run()
+ exit(-1)
usage = 'usage: %prog [options] [saved flow graphs]'
version = """
GNU Radio Companion %s