run_ivl.py: Properly escape `.` in regex

To escape the `.` in the regex it needs to be prefixed with a `\`. But
since the `\` is a escape character in python strings it needs to be
escaped as well.

Without this some versions of python print the following warning:

      run_ivl.py:36: SyntaxWarning: invalid escape sequence '\.'
        match= re.search(b'Icarus Verilog version ([0-9]+)\.([0-9]+)', text)

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
Lars-Peter Clausen 2024-01-14 17:16:39 -08:00
parent b1e602d27c
commit c93e8334a2
1 changed files with 1 additions and 1 deletions

View File

@ -33,7 +33,7 @@ def get_ivl_version () -> list:
# Get the output from the "iverilog -V" command for the version string.
text = subprocess.check_output(["iverilog", "-V"])
match = re.search(b'Icarus Verilog version ([0-9]+)\.([0-9]+)', text)
match = re.search(b'Icarus Verilog version ([0-9]+)\\.([0-9]+)', text)
if not match:
return None