Skip to content
This repository was archived by the owner on Jun 20, 2024. It is now read-only.

Commit d48da8a

Browse files
authored
Fix launch_vm_process EnvironmentChange type error
1 parent 706c8e3 commit d48da8a

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

README.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ Launching a Machine
4646
4747
>>> session = virtualbox.Session()
4848
>>> machine = vbox.find_machine("windows")
49-
>>> progress = machine.launch_vm_process(session, "gui", "")
49+
>>> # progress = machine.launch_vm_process(session, "gui", "")
50+
>>> # For virtualbox API 6_1 and above (VirtualBox 6.1.2+), use the following:
51+
>>> progress = machine.launch_vm_process(session, "gui", [])
5052
>>> progress.wait_for_completion()
5153
5254
Querying the Machine

virtualbox/library.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12795,8 +12795,8 @@ def launch_vm_process(self, session, name, environment):
1279512795
raise TypeError("session can only be an instance of type ISession")
1279612796
if not isinstance(name, basestring):
1279712797
raise TypeError("name can only be an instance of type basestring")
12798-
if not isinstance(environment, basestring):
12799-
raise TypeError("environment can only be an instance of type basestring")
12798+
if not (isinstance(environment, basestring) or isinstance(environment, list)):
12799+
raise TypeError("environment can only be an instance of type basestring or list")
1280012800
progress = self._call("launchVMProcess",
1280112801
in_p=[session, name, environment])
1280212802
progress = IProgress(progress)

0 commit comments

Comments
 (0)