use ImportError for python 3.5 compatibility

This commit is contained in:
Jakob Ketterl 2021-10-27 18:33:23 +02:00
parent 33c8e34456
commit 85c7a05978

View File

@ -484,7 +484,7 @@ class SdrDeviceDescription(object):
module = __import__("owrx.source.{0}".format(sdr_type), fromlist=[className])
cls = getattr(module, className)
return cls()
except (ModuleNotFoundError, AttributeError):
except (ImportError, AttributeError):
raise SdrDeviceDescriptionMissing("Device description for type {} not available".format(sdr_type))
@staticmethod