diff options
Diffstat (limited to 'gnuradio-runtime/python/gnuradio/ctrlport/monitor.py')
-rw-r--r-- | gnuradio-runtime/python/gnuradio/ctrlport/monitor.py | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/gnuradio-runtime/python/gnuradio/ctrlport/monitor.py b/gnuradio-runtime/python/gnuradio/ctrlport/monitor.py index 87d6cb9e7f..0cc05be63e 100644 --- a/gnuradio-runtime/python/gnuradio/ctrlport/monitor.py +++ b/gnuradio-runtime/python/gnuradio/ctrlport/monitor.py @@ -33,15 +33,12 @@ class monitor(object): self.tool = tool atexit.register(self.shutdown) - try: - # setup export prefs - gr.prefs().singleton().set_bool("ControlPort","on",True); - if(tool == "gr-perf-monitorx"): - gr.prefs().singleton().set_bool("ControlPort","edges_list",True); - gr.prefs().singleton().set_bool("PerfCounters","on",True); - gr.prefs().singleton().set_bool("PerfCounters","export",True); - except: - print("no support for gr.prefs setting") + # setup export prefs + gr.prefs().singleton().set_bool("ControlPort","on",True); + if(tool == "gr-perf-monitorx"): + gr.prefs().singleton().set_bool("ControlPort","edges_list",True); + gr.prefs().singleton().set_bool("PerfCounters","on",True); + gr.prefs().singleton().set_bool("PerfCounters","export",True); def __del__(self): if(self.started): @@ -57,7 +54,7 @@ class monitor(object): print("running: %s"%(str(cmd))) self.proc = subprocess.Popen(cmd); self.started = True - except: + except (ValueError, OSError): self.proc = None print("failed to to start ControlPort Monitor on specified port") |