Merge pull request #2526 from emmanuel-ferdman/master
Some checks failed
CodeQL / Analyze (python) (push) Has been cancelled
testing / build (ubuntu-latest, 3.10) (push) Has been cancelled
testing / build (ubuntu-latest, 3.11) (push) Has been cancelled
testing / build (ubuntu-latest, 3.12) (push) Has been cancelled
testing / build (ubuntu-latest, 3.13) (push) Has been cancelled
testing / build (ubuntu-latest, 3.8) (push) Has been cancelled
testing / build (ubuntu-latest, 3.9) (push) Has been cancelled

Resolve deprecation warnings of regex library
This commit is contained in:
Jeremy Grossmann 2025-04-30 14:14:37 +07:00 committed by GitHub
commit add8c4e8a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -225,7 +225,7 @@ class QemuVM(BaseNode):
if qemu_bin == "qemu":
self._platform = "i386"
else:
self._platform = re.sub(r'^qemu-system-(\w+).*$', r'\1', qemu_bin, re.IGNORECASE)
self._platform = re.sub(r'^qemu-system-(\w+).*$', r'\1', qemu_bin, flags=re.IGNORECASE)
if self._platform.split(".")[0] not in QEMU_PLATFORMS:
raise QemuError("Platform {} is unknown".format(self._platform))
log.info('QEMU VM "{name}" [{id}] has set the QEMU path to {qemu_path}'.format(name=self._name,