File tree 2 files changed +2
-3
lines changed
2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -118,6 +118,6 @@ def restore( # pylint: disable=too-many-branches
118
118
119
119
if args .adjust_config is True :
120
120
restConfig = vmconfig .removeUuid (restConfig .decode ())
121
- restConfig = vmconfig .setVMName (args , restConfig )
121
+ restConfig = vmconfig .setVMName (args , restConfig . decode () )
122
122
123
123
return restConfig
Original file line number Diff line number Diff line change @@ -54,7 +54,6 @@ def removeUuid(vmConfig: str) -> bytes:
54
54
"""Remove the auto generated UUID from the config file to allow
55
55
for restore into new name"""
56
56
tree = xml .asTree (vmConfig )
57
-
58
57
try :
59
58
logging .info ("Removing uuid setting from vm config." )
60
59
uuid = tree .xpath ("uuid" )[0 ]
@@ -65,7 +64,7 @@ def removeUuid(vmConfig: str) -> bytes:
65
64
return xml .ElementTree .tostring (tree , encoding = "utf8" , method = "xml" )
66
65
67
66
68
- def setVMName (args : Namespace , vmConfig : bytes ) -> bytes :
67
+ def setVMName (args : Namespace , vmConfig : str ) -> bytes :
69
68
"""Change / set the VM name to be restored"""
70
69
tree = xml .asTree (vmConfig )
71
70
name = tree .xpath ("name" )[0 ]
You can’t perform that action at this time.
0 commit comments