commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r4406 - gnuradio/branches/releases/3.0/gr-wxgui/src/py


From: jcorgan
Subject: [Commit-gnuradio] r4406 - gnuradio/branches/releases/3.0/gr-wxgui/src/python
Date: Wed, 7 Feb 2007 11:14:41 -0700 (MST)

Author: jcorgan
Date: 2007-02-07 11:14:40 -0700 (Wed, 07 Feb 2007)
New Revision: 4406

Modified:
   gnuradio/branches/releases/3.0/gr-wxgui/src/python/powermate.py
Log:
Applied changeset r4163 on trunk to release branch.

Modified: gnuradio/branches/releases/3.0/gr-wxgui/src/python/powermate.py
===================================================================
--- gnuradio/branches/releases/3.0/gr-wxgui/src/python/powermate.py     
2007-02-07 18:10:46 UTC (rev 4405)
+++ gnuradio/branches/releases/3.0/gr-wxgui/src/python/powermate.py     
2007-02-07 18:14:40 UTC (rev 4406)
@@ -25,16 +25,24 @@
 
 This is Linux and wxPython specific.
 """
-import select
+
 import os
-import fcntl
+import sys
 import struct
 import exceptions
 import threading
-import sys
 import wx
 from gnuradio import gru
 
+imported_ok = True
+
+try:
+    import select
+    import fcntl
+except ImportError:
+    imported_ok = False
+
+
 # First a little bit of background:
 #
 # The Griffin PowerMate has
@@ -157,6 +165,9 @@
     def __init__(self, event_receiver=None, filename=None, **kwargs):
         self.event_receiver = event_receiver
         self.handle = -1
+        if not imported_ok:
+            raise exceptions.RuntimeError, 'powermate not supported on this 
platform'
+
         if filename:
             if not self._open_device(filename):
                 raise exceptions.RuntimeError, 'Unable to find powermate'





reply via email to

[Prev in Thread] Current Thread [Next in Thread]