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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user