Python novice; split a string
<p>I am trying to write a patch for some open source software because it doesn't do <em>quite</em> what I'd like--except I don't know Python, at all!  I expect this is very simple, but it is defeating me.</p>

<p><strong>Background:</strong> The patch I am writing is for Ganeti which I am using to manage KVM virtual machine clusters, but it doesn't support all the possible command line options of KVM and Qemu, such as USB pass-through, so I am trying to modify it to allow this.</p>

<p><code>kvm_cmd.extend()</code> is used to add to the array of KVM CLI args that will be passed when a VM is started.  If the arguments are space-separated, each argument becomes a separate string, e.g. <code>-usb -device usb-host,hostbus=1,hostdev=14</code> becomes <code>"-usb", "-device", "usb-host,hostbus=1,hostdev=14"</code>.</p>

<p>I am running the following command after compiling the code:</p>

<pre><code>gnt-instance modify -H usb_pass="1;14"
</code></pre>

<p>I want this to add to the existing list of command line arguments <code>"-usb -device usb-host,hostbus=1,hostdev=14"</code>.  This is the code I have added (as well as declaring the variables elsewhere; <code>HV_USBPASSTHROUGH</code> is a string, but this is where the magic happens)</p>

<pre><code>usb_pass = instance.hvparams[constants.HV_USBPASSTHROUGH]
if usb_pass:
    usb_pass_arr = []
    usb_pass_arr = usb_pass.split(";")
    kvm_cmd.extend(["-usb", "-device", "usb-host,hostbus=%s,hostaddr=%s" %
                    usb_pass_arr])
</code></pre>

<p>I am getting the following error from running the above command with the above code:  <code>Could not start instance: Error while executing backend function: not enough arguments for format string</code></p>
