diff options
author | Martin Braun <martin.braun@ettus.com> | 2024-03-28 17:28:06 +0100 |
---|---|---|
committer | joergho <48011876+joergho@users.noreply.github.com> | 2024-04-02 11:02:11 +0200 |
commit | 89091c1edd075a7104a7f075ba1831c0b1ab86f5 (patch) | |
tree | 206e19db075a7b76c6adece9b7dfac5f86b004a2 | |
parent | examples: Fix rx_gain_estimate_power (diff) | |
download | uhd-89091c1edd075a7104a7f075ba1831c0b1ab86f5.tar.xz uhd-89091c1edd075a7104a7f075ba1831c0b1ab86f5.zip |
lib: ic_reg_maps: Fix Python warning regarding \w
We were using \w as part of a regular expression without declaring the
string 'r', which caused warnings while running the regmap generator.
-rwxr-xr-x | host/lib/ic_reg_maps/common.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/host/lib/ic_reg_maps/common.py b/host/lib/ic_reg_maps/common.py index c0f73fc8a..b62cc6e83 100755 --- a/host/lib/ic_reg_maps/common.py +++ b/host/lib/ic_reg_maps/common.py @@ -376,7 +376,7 @@ class mreg: raise Exception('Error parsing meta register description: "%s"\nWhat: %s'%(mreg_des, e)) def parse(self, mreg_des, regs): - x = re.match('^~(\w*)\s+(.*)\s*$', mreg_des) + x = re.match(r'^~(\w*)\s+(.*)\s*$', mreg_des) self._name, reg_names = x.groups() regs_dict = dict([(reg.get_name(), reg) for reg in regs]) self._regs = [regs_dict[reg_name.strip()] for reg_name in reg_names.split(',')] |