mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-26 23:54:35 +02:00
Merge pull request #2526 from emmanuel-ferdman/master
Resolve deprecation warnings of regex library
This commit is contained in:
1 file changed
+1
-1
@@ -225,7 +225,7 @@ class QemuVM(BaseNode):
|
|||||||
if qemu_bin == "qemu":
|
if qemu_bin == "qemu":
|
||||||
self._platform = "i386"
|
self._platform = "i386"
|
||||||
else:
|
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:
|
if self._platform.split(".")[0] not in QEMU_PLATFORMS:
|
||||||
raise QemuError("Platform {} is unknown".format(self._platform))
|
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,
|
log.info('QEMU VM "{name}" [{id}] has set the QEMU path to {qemu_path}'.format(name=self._name,
|
||||||
|
|||||||
Reference in new issue
Block a user