diff options
author | Nicholas Corgan <nick.corgan@ettus.com> | 2015-07-07 15:41:50 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2015-07-14 14:51:32 -0700 |
commit | 8057c17458bd32856842299df58662e784423d8f (patch) | |
tree | d9edfe04cd3df7f994328ab76dc6840c6bdedc79 /host/lib/ic_reg_maps | |
parent | 4b1034b29e57a0b405fc89de4602819a4b8cc970 (diff) | |
download | uhd-8057c17458bd32856842299df58662e784423d8f.tar.gz uhd-8057c17458bd32856842299df58662e784423d8f.tar.bz2 uhd-8057c17458bd32856842299df58662e784423d8f.zip |
build: Python 3 compatibility for build scripts
Diffstat (limited to 'host/lib/ic_reg_maps')
-rwxr-xr-x | host/lib/ic_reg_maps/common.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/host/lib/ic_reg_maps/common.py b/host/lib/ic_reg_maps/common.py index 0351d54a1..5c0cfc109 100755 --- a/host/lib/ic_reg_maps/common.py +++ b/host/lib/ic_reg_maps/common.py @@ -109,8 +109,8 @@ def to_num(arg): return int(eval(arg)) class reg: def __init__(self, reg_des): try: self.parse(reg_des) - except Exception, e: - raise Exception, 'Error parsing register description: "%s"\nWhat: %s'%(reg_des, e) + except Exception as e: + raise Exception('Error parsing register description: "%s"\nWhat: %s'%(reg_des, e)) def parse(self, reg_des): x = re.match('^(\w*)\s*(\w*)\[(.*)\]\s*(\w*)\s*(.*)$', reg_des) @@ -153,8 +153,8 @@ class reg: class mreg: def __init__(self, mreg_des, regs): try: self.parse(mreg_des, regs) - except Exception, e: - raise Exception, 'Error parsing meta register description: "%s"\nWhat: %s'%(mreg_des, e) + except Exception as e: + 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) |