diff options
author | Joerg Hofrichter <joerg.hofrichter@ni.com> | 2019-10-08 10:09:31 +0200 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-10-08 12:03:47 -0700 |
commit | 3c38411bb69a4303a09ad2e158c902b5db2885fb (patch) | |
tree | 2fb4d5d958b352152c10f46e8ae98e1dfb72a106 /mpm | |
parent | 12a0656c65b956024be7a12ab3cde421d2fb43e4 (diff) | |
download | uhd-3c38411bb69a4303a09ad2e158c902b5db2885fb.tar.gz uhd-3c38411bb69a4303a09ad2e158c902b5db2885fb.tar.bz2 uhd-3c38411bb69a4303a09ad2e158c902b5db2885fb.zip |
mpm: usrp_hwd: fix for gevent 1.4.0
Openembedded release warrior includes python3-gevent 1.4.0 which
leads to the following error when starting usrp-hwd.py:
ImportError: cannot import name 'BlockingSwitchOutError' from 'gevent.hub'
This commit fixes the issue.
Signed-off-by: Joerg Hofrichter <joerg.hofrichter@ni.com>
Diffstat (limited to 'mpm')
-rwxr-xr-x | mpm/python/usrp_hwd.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mpm/python/usrp_hwd.py b/mpm/python/usrp_hwd.py index a09ea95ed..d971cc5fc 100755 --- a/mpm/python/usrp_hwd.py +++ b/mpm/python/usrp_hwd.py @@ -12,7 +12,10 @@ import sys import time import argparse from gevent import signal -from gevent.hub import BlockingSwitchOutError +try: + from gevent.hub import BlockingSwitchOutError +except ImportError: + from gevent.exceptions import BlockingSwitchOutError import usrp_mpm as mpm from usrp_mpm.mpmtypes import SharedState from usrp_mpm.sys_utils import watchdog @@ -187,4 +190,3 @@ def main(): if __name__ == '__main__': exit(not main()) - |