https://github.com/ptrkrysik/gr-gsm/blob/2de47e28ce1fb9a518337bfc0add36c8e3cff5eb/python/misc_utils/device.py#L33-L33C46 runtime error: TypeError: argument of type 'osmosdr.osmosdr_python.device_t' is not iterable better to check this way: if not hasattr(dev, k) or getattr(dev,k) != v: