diff options
author | Josh Blum | 2012-03-16 15:37:44 -0700 |
---|---|---|
committer | Josh Blum | 2012-03-23 14:08:23 -0700 |
commit | 708b7e46a9407710f9aab9444561d464fa56c9b9 (patch) | |
tree | 78a2fc36876bc736094008f49132305760691edc /gr-uhd/swig/__init__.py | |
parent | f95a0abbd501142468b33d63bda0ca69e56cea5b (diff) | |
download | gnuradio-708b7e46a9407710f9aab9444561d464fa56c9b9.tar.gz gnuradio-708b7e46a9407710f9aab9444561d464fa56c9b9.tar.bz2 gnuradio-708b7e46a9407710f9aab9444561d464fa56c9b9.zip |
uhd: fix device_addr init issue
Diffstat (limited to 'gr-uhd/swig/__init__.py')
-rw-r--r-- | gr-uhd/swig/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gr-uhd/swig/__init__.py b/gr-uhd/swig/__init__.py index d098a7b8a..82dbdd9e7 100644 --- a/gr-uhd/swig/__init__.py +++ b/gr-uhd/swig/__init__.py @@ -55,6 +55,10 @@ def _prepare_uhd_swig(): def __new__(self, *args): return str.__new__(self) def __getitem__(self, key): return self.get(key) def __setitem__(self, key, val): self.set(key, val) + def __init__(self, *args, **kwargs): + super(device_addr_t, self).__init__(*args) + if args and isinstance(args[0], device_addr_t): + for key in args[0].keys(): self[key] = args[0][key] setattr(uhd_swig, 'device_addr_t', device_addr_t) #make the streamer args take **kwargs on init |