1
0
forked from M-Labs/artiq

artiq_flash: Fix incorrect re.sub() call

The 4th positional parameter is `count`, not `flags` (see
https://github.com/python/cpython/issues/56166), which is
now caught by a DeprecationWarning in 3.13.
This commit is contained in:
David Nadlinger
2026-02-01 18:11:09 +00:00
parent 0570d61300
commit ec8ae26d51

View File

@@ -133,7 +133,7 @@ class Programmer:
def rewriter(content):
def repl(match):
return self._transfer_script(match.group(1).decode()).encode()
return re.sub(rb"\[find (.+?)\]", repl, content, re.DOTALL)
return re.sub(rb"\[find (.+?)\]", repl, content, flags=re.DOTALL)
script = os.path.join(scripts_path(), script)
return self._client.upload(script, rewriter)