From 3c38411bb69a4303a09ad2e158c902b5db2885fb Mon Sep 17 00:00:00 2001 From: Joerg Hofrichter Date: Tue, 8 Oct 2019 10:09:31 +0200 Subject: 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 --- mpm/python/usrp_hwd.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'mpm') 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()) - -- cgit v1.2.3