fix: passing maxsplit in re.split() as positional argument is deprecated

This commit is contained in:
Tanguy Rossel 2026-02-06 08:42:32 +01:00
parent 2c0f9593a4
commit 68abb98e4e
No known key found for this signature in database
GPG Key ID: 9F414A0681D76582

View File

@ -248,7 +248,7 @@ class Config:
for e in raw_global_conf: for e in raw_global_conf:
s = util.bytes_to_str(e) s = util.bytes_to_str(e)
try: try:
k, v = re.split(r'(?<!\\)=', s, 1) k, v = re.split(r'(?<!\\)=', s, maxsplit=1)
except ValueError: except ValueError:
raise RuntimeError("environment setting %r invalid" % s) raise RuntimeError("environment setting %r invalid" % s)
k = k.replace('\\=', '=') k = k.replace('\\=', '=')