2024-12-09 12:15:39 +01:00
|
|
|
References: bsc#1234215
|
|
|
|
|
2025-04-24 00:31:50 +02:00
|
|
|
Index: virt-manager-5.0.0/virtinst/devices/disk.py
|
|
|
|
===================================================================
|
|
|
|
--- virt-manager-5.0.0.orig/virtinst/devices/disk.py
|
|
|
|
+++ virt-manager-5.0.0/virtinst/devices/disk.py
|
|
|
|
@@ -678,7 +678,10 @@ class DeviceDisk(Device):
|
2024-12-09 12:15:39 +01:00
|
|
|
# Some file managers use 'file://' when passing files to
|
|
|
|
# virt-manager, we need to strip it from the newpath.
|
|
|
|
if newpath is not None:
|
|
|
|
- newpath = newpath.removeprefix("file://")
|
|
|
|
+ # str.removeprefix(prefix, /) available in python 3.9 or newer
|
|
|
|
+ prefix = "file://"
|
|
|
|
+ if newpath.startswith(prefix):
|
|
|
|
+ newpath = newpath[len(prefix):]
|
|
|
|
|
|
|
|
if self._storage_backend.will_create_storage():
|
|
|
|
raise xmlutil.DevError(
|